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:
Holger Hans Peter Freyther 2010-12-23 22:12:57 +01:00
parent e3018c7ad6
commit 9d277d3b33
1 changed files with 10 additions and 0 deletions

View File

@ -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.
].
]