[Philip Martin]
>   sqlite3 wcx.db "select count(*) from nodes where wc_id = 1 and 
> local_relpath = 'zag1/zag27'"
> 
>   sqlite3 wcx.db "select count(*) from nodes where wc_id = 1 and 
> (local_relpath > 'zig1/zag27/' and local_relpath < 'zig1/zag270')"

>   sqlite3 wcx.db "select count(*) from nodes where wc_id = 1 and 
> local_relpath = 'zig1/zag27' or (local_
relpath > 'zig1/zag27/' and local_relpath < 'zig1/zag270')"

AND has higher precedence than OR, so you want more parens:

    sqlite3 wcx.db "select count(*) from nodes where wc_id = 1 and 
(local_relpath = 'zig1/zag27' or (local_relpath > 'zig1/zag27/' and 
local_relpath < 'zig1/zag270'))"

Peter

Reply via email to