Changeset 1311 in ExiteCMS for trunk/forum/options.php


Ignore:
Timestamp:
02/27/08 11:25:49 (4 years ago)
Author:
hverton
Message:

added the new thread_first_read field to all posts unread queries, to get a more accurante unread posts number

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/options.php

    r1247 r1311  
    243243        $result = dbquery("SELECT user_id, thread_last_read FROM ".$db_prefix."threads_read WHERE thread_id = '".$thread_id."'"); 
    244244        while ($data = dbarray($result)) { 
     245            $result2 = dbquery("UPDATE ".$db_prefix."threads_read SET thread_first_read = '".$data['thread_first_read']."' WHERE user_id = '".$data['user_id']."' AND thread_id = '".$new_thread_id."' AND thread_first_read > '".$data['thread_first_read']."'"); 
    245246            $result2 = dbquery("UPDATE ".$db_prefix."threads_read SET thread_last_read = '".$data['thread_last_read']."' WHERE user_id = '".$data['user_id']."' AND thread_id = '".$new_thread_id."' AND thread_last_read < '".$data['thread_last_read']."'"); 
    246247        } 
Note: See TracChangeset for help on using the changeset viewer.