[thelist] MySQL query: not like a, b, c,...
Mike
evolt at muinar.com
Fri Apr 9 03:40:09 CDT 2004
At 22:11 08.04.2004 -0400, you wrote:
>Mike,
>
>Not an MySQL guru, but (without the specific error text this is tough)
>perhaps the logical operator is out of order?
>
>user NOT LIKE 'z%'
>! user LIKE 'z%'
Hi Joshua
Exactly, that was it. It works with:
$query = "select * from otn_user where
user not like 'a%' and
user not like 'b%' and...
This throws an error:
$query = "select * from otn_user where
user ! like 'a%' and
user ! like 'b%' and...
And this seems to be another logic, it gives no results (no error either):
$query = "select * from otn_user where
! user like 'a%' and
! user like 'b%' and...
I can't see the difference of ! and NOT in the MySQL tutorial:
http://dev.mysql.com/doc/mysql/en/Logical_Operators.html
Does anyone know the difference? Has it to do with the combination
of AND with ! maybe?
Always eager to learn...
Mike
_____ mike s. krischker http://webdesign-schweiz.ch/
flashpro mailing list http://flash-list.com/
royalty free flash sounds http://flash-sounds.com/
More information about the thelist
mailing list