SQLite: add semaphore to allow a single connection at a time
SQLite: replace 'true' and 'false' with '1=1' and '1=0' so that SQLite will be happy
sort filter values