Re: [sqlite] Re: Query returns all rows
Hmm.. I'm so used to doing this via php's sqlite interface: SELECT * FROM blah WHERE id = "12345"; "form" in double quotes is an alternative way to refer to FORM column - it is _not_ a string literal. So your query condition is WHERE FORM=FORM, which is of course always true (except maybe when FORM is NULL). A string literal should be enclosed in single quotes, as in 'form'. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: Query returns all rows
David Champagne wrote: If I have a table defined in the following manner CREATE TABLE License (Form varchar(256), Type int, NbOcc int) and then I execute a query SELECT * FROM License WHERE FORM = "form"; I get all rows returned "form" in double quotes is an alternative way to refer to FORM column - it is _not_ a string literal. So your query condition is WHERE FORM=FORM, which is of course always true (except maybe when FORM is NULL). A string literal should be enclosed in single quotes, as in 'form'. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -