Re: Problem with MySQL Query
| From: | Mikael Jansson | Date: | Thu, 24 Jul 2003 06:51:24 +0000 |
| Subject: | Re: Problem with MySQL Query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156600@lists.php.net to get a copy of this message | ||
Hi Phil,
What I can see in your question there is a missing space between fieldname
"type" and the operator !=
I tested on my machine and it works fine when using both != and <>
operators, but it will not work with the NOT operator.
Hope the missing space will do some good.
br
/Mikael
"Phillip Blancher" <phil@ontarioweb.ca> wrote in message
news:001f01c3515e$9dcba310$6802a8c0@staff...
Problem with mySQL Query
This is the query I have:
$dbqueryshipping1 = "select * from tempuserpurchase where
(usersessionid=\"$User_Shopping_Id\") and day=\"1\" and
type!=\"Meal+Plans\"
";
What I want to do is to select everything from tempuserpurchase that matchs
the user session and the day, so long as type is not "Meal Plans"
However it is not excluding "Meal Plans"
Any Suggestions.
Thanks in advance,
Phil
__________________
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003