sms: Add a script to query for unsent SMS
This is generating the query statement. It can be used to play with database indexes and such.
This commit is contained in:
parent
e3018c7ad6
commit
9d277d3b33
|
@ -0,0 +1,10 @@
|
|||
"Query for one SMS"
|
||||
|
||||
Eval [
|
||||
1 to: 100 do: [:each |
|
||||
Transcript show: 'SELECT SMS.* FROM SMS
|
||||
JOIN Subscriber ON SMS.receiver_id = Subscriber.id
|
||||
WHERE SMS.id >= 1 AND SMS.sent IS NULL AND Subscriber.lac > 0
|
||||
ORDER BY SMS.id LIMIT 1;'; nl.
|
||||
].
|
||||
]
|
Loading…
Reference in New Issue