2009/10/13 Hillebrand Snip <[email protected]>:
> I have a database with the following fields:
> 1) Status (it will hold values like "Open", "Closed", "Submitted"... etc...)
> 2) Closed (boolean field which contains 1 or 0)
>
> If i enter a query like:  Select * from Issues where Status != "Closed"  i
> get all records (even the ones with Status=Closed).
> If i replace "Closed" by "Submitted" which is not also a field name the
> results are as expected.
>
> I think this is a bug.

... in your select statement.

Double quotes are used to delimit identifiers. Use single quotes to
delimit string literals, i.e.
    Select * from Issues where Status != 'Closed'

Where SQLite cannot find a column match for a double-quote delimited
string, then it will assume that a string literal is intended.

See http://www.sqlite.org/lang_keywords.html

>
> I use Apache.
>
> SQLITE Information from phpinfo():
>
>
> SQLiteSQLite supportenabledPECL Module version2.0-dev $Id: sqlite.c,v
> 1.166.2.13.2.10 2007/12/31 07:20:11 sebastian Exp $SQLite Library2.8.17SQLite
> Encodingiso8859

Regards,
Simon
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to