Changeset 3464


Ignore:
Timestamp:
Jun 26, 2009, 11:57:28 AM (11 years ago)
Author:
rub
Message:

Feature 1026: Update column save author_id with value
Check user with comment date and registration date

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/install/db/83-database.php

    r3459 r3464  
    3030
    3131$query = '
    32 UPDATE '.COMMENTS_TABLE.' AS c , '.USERS_TABLE.' AS u
     32UPDATE
     33  '.COMMENTS_TABLE.' AS c ,
     34  '.USERS_TABLE.' AS u,
     35  '.USER_INFOS_TABLE.' AS i
    3336SET c.author_id = u.'.$conf['user_fields']['id'].'
    34 WHERE c.author = u.'.$conf['user_fields']['username'].' AND c.author_id is null
     37WHERE
     38    c.author_id is null
     39AND c.author = u.'.$conf['user_fields']['username'].'
     40AND u.'.$conf['user_fields']['id'].' = i.user_id
     41AND i.registration_date <= c.date
    3542;';
    3643
Note: See TracChangeset for help on using the changeset viewer.