T
timeOday
I have the following query which is invoked in a loop for each value of
account_id; otherwise the query is identical each time.
"select * from updates where account_id=33 and update_time >= 343837
limit 1"
That is, the first update for the accounts at or after the specified time.
All the account ids can be retrieved with the query:
"select account_id from accounts"
The looping seems wrong. Surely there's a way to do it with a single
SQL query, but I can't put my finger on it.
account_id; otherwise the query is identical each time.
"select * from updates where account_id=33 and update_time >= 343837
limit 1"
That is, the first update for the accounts at or after the specified time.
All the account ids can be retrieved with the query:
"select account_id from accounts"
The looping seems wrong. Surely there's a way to do it with a single
SQL query, but I can't put my finger on it.