correct method for querying
darcs-hash:20081112181327-5ed1f-b9703dc936c8d99b226055053b02e4ba177b240d.gz
This commit is contained in:
parent
b3ed4e5e20
commit
52431fa58b
@ -37,9 +37,9 @@ $cnt = $user->find();
|
||||
while ($user->fetch()) {
|
||||
common_log(LOG_INFO, 'Updating inbox for user ' . $user->id);
|
||||
$inbox = new Notice_inbox();
|
||||
$inbox->qry('INSERT INTO notice_inbox (user_id, notice_id, created) ' .
|
||||
'SELECT ' . $user->id . ', notice.id, notice.created ' .
|
||||
'FROM subscription JOIN notice ON subscription.subscribed = notice.profile_id ' .
|
||||
'WHERE subscription.subscriber = ' . $user->id . ' ' .
|
||||
'AND notice.created >= subscription.created');
|
||||
$inbox->query('INSERT INTO notice_inbox (user_id, notice_id, created) ' .
|
||||
'SELECT ' . $user->id . ', notice.id, notice.created ' .
|
||||
'FROM subscription JOIN notice ON subscription.subscribed = notice.profile_id ' .
|
||||
'WHERE subscription.subscriber = ' . $user->id . ' ' .
|
||||
'AND notice.created >= subscription.created');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user