Changeset 862 in ExiteCMS for modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php
- Timestamp:
- 10/02/07 22:27:18 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php
r844 r862 20 20 // get the list of latest threads 21 21 $result = dbquery( 22 "SELECT tf.*, tt.*, tu.user_id,user_name , MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_postsFROM ".$db_prefix."forums tf22 "SELECT tf.*, tt.*, tu.user_id,user_name FROM ".$db_prefix."forums tf 23 23 INNER JOIN ".$db_prefix."threads tt USING(forum_id) 24 24 INNER JOIN ".$db_prefix."posts tp USING(thread_id) … … 38 38 while ($data = dbarray($result)) { 39 39 $data['poll'] = fpm_panels_poll_exists($data['forum_id'], $data['thread_id']); 40 $data['count_posts']--; 40 $data2 = dbarray(dbquery("SELECT MAX(post_id) AS last_id FROM ".$db_prefix."posts WHERE thread_id = '".$data['thread_id']."'")); 41 $data['last_id'] = $data2['last_id']; 42 $data['count_posts'] = dbcount("(*)", "posts", "thread_id = '".$data['thread_id']."'") - 1; 41 43 $threadlist[] = $data; 42 44 }
Note: See TracChangeset
for help on using the changeset viewer.
