Changeset 9218
- Timestamp:
- Nov 18, 2008, 2:57:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/webapp/lib/db/commu.php
r9130 r9218 524 524 foreach ($list as $key => $value) { 525 525 $list[$key]['count_comments'] = db_commu_get_max_c_commu_topic_comment_number4c_topic_id($value['c_commu_topic_id']); 526 $ last_comment = db_commu_get_last_c_topic_comment($value['c_commu_topic_id']);527 $list[$key]['image_filename1'] = $ last_comment['image_filename1'];528 $list[$key]['image_filename2'] = $ last_comment['image_filename2'];529 $list[$key]['image_filename3'] = $ last_comment['image_filename3'];526 $start_comment = db_commu_get_start_c_topic_comment($value['c_commu_topic_id']); 527 $list[$key]['image_filename1'] = $start_comment['image_filename1']; 528 $list[$key]['image_filename2'] = $start_comment['image_filename2']; 529 $list[$key]['image_filename3'] = $start_comment['image_filename3']; 530 530 } 531 531 return $list; … … 1174 1174 $c_commu_topic_list[$key]['nickname'] = $c_member['nickname']; 1175 1175 1176 $temp = db_commu_get_ last_c_topic_comment($value['c_commu_topic_id']);1176 $temp = db_commu_get_start_c_topic_comment($value['c_commu_topic_id']); 1177 1177 1178 1178 $sql = 'SELECT name AS c_commu_name FROM c_commu WHERE c_commu_id = ?'; … … 1214 1214 $c_commu_topic_list[$key]['nickname'] = $c_member['nickname']; 1215 1215 1216 $temp = db_commu_get_ last_c_topic_comment($value['c_commu_topic_id']);1216 $temp = db_commu_get_start_c_topic_comment($value['c_commu_topic_id']); 1217 1217 1218 1218 $sql = 'SELECT name AS c_commu_name FROM c_commu WHERE c_commu_id = ?'; … … 3389 3389 3390 3390 /* 3391 * 最 終書き込みコメントの情報取得3392 */ 3393 function db_commu_get_ last_c_topic_comment($c_commu_topic_id)3394 { 3395 $sql = 'SELECT * FROM c_commu_topic_comment WHERE c_commu_topic_id = ? ORDER BY r_datetime DESC';3391 * 最初の書き込みコメントの情報取得(親トピック) 3392 */ 3393 function db_commu_get_start_c_topic_comment($c_commu_topic_id) 3394 { 3395 $sql = 'SELECT * FROM c_commu_topic_comment WHERE c_commu_topic_id = ? ORDER BY r_datetime ASC'; 3396 3396 $params = array(intval($c_commu_topic_id)); 3397 3397 return db_get_row($sql,$params);
Note: See TracChangeset
for help on using the changeset viewer.