Your query below unless it's in some kind of pseudocode, needs quotes around the i, vis :
not as stated
Because 'i' is a string and must be quoted. The same happens for ENUM columns, even though the values might appear numeric (100, 400, 500) they must be quoted and treated like strings, as they are not internally numbers, but indexes into a list of strings. In the same way, you can return the index directly by asking for status+0 which converts the status index into a number rather than returning the string '100' you will get the number 1 (which is useful when creating checkboxes from ENUMs)
At 14:36 29/05/2004 +0000, you wrote:
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> From: [EMAIL PROTECTED] Content-Type: text/plain; format=flowed; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Sat, 29 May 2004 10:35:40 -0400 Message-ID: <[EMAIL PROTECTED]> Subject: "Where" Error
This should be ultimately simple; it just doesn't work. I want to limit display to rows from a single table in which the status column contains i. Only options are i, c, o. After the select line I have "where status = i" (no quote marks). I get an error message to the "while" line that calls the table.
When I limit by another column "where netreceipts > 500" I get the desired result. When I change it to "where netreceipts = 500" (and there is a 500) I get the error message above.
What's the solution?
======================================================== CaptionKit http://www.captionkit.com : Production tools for accessible subtitled internet media, transcripts and searchable video. Supports Real Player, Quicktime and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every day at http://www.fresh-toast.net : NetMeeting solutions for a connected world.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php