[db] Fix queries for unsent SMS

- Need to use sms.id for the ORDER BY since 'subscriber' also has 'id'
- Need to add the join clause between 'SMS' and 'subscriber'
- Add a LIMIT 1 (probably no impact for the db size we're dealing with
here, but with large DB and mysql/postgresql this can help the planner)
- (fix a wrong comment in passing ...)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
1 file changed
tree: 06b4fcb9300b80b102e79bcca3fc23c5697766d0
  1. hlrsync/
  2. linux-kernel/
  3. openbsc/
  4. wireshark/