summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-11-12 13:13:27 -0500
committerEvan Prodromou <evan@controlyourself.ca>2008-11-12 13:13:27 -0500
commit52431fa58b4626f4ad76b2e12f356568a726454e (patch)
treeb419f0b88a09a673be374d5d54bd8ed15a5733aa
parentb3ed4e5e20523673d4005415e8d9f26bf0748659 (diff)
correct method for querying
darcs-hash:20081112181327-5ed1f-b9703dc936c8d99b226055053b02e4ba177b240d.gz
-rwxr-xr-xscripts/fixup_inboxes.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/fixup_inboxes.php b/scripts/fixup_inboxes.php
index 1b7113ed4..415dea4dc 100755
--- a/scripts/fixup_inboxes.php
+++ b/scripts/fixup_inboxes.php
@@ -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');
}