Why would have to write not, when your keyword=a will not return b to begin
with?

But if this was really just an example you would do this.

SELECT data_id from table WHERE keyword = a AND keyword != b

Donny
> -----Original Message-----
> From: L a n a [mailto:[EMAIL PROTECTED]
> Sent: Saturday, November 06, 2004 10:35 PM
> To: [EMAIL PROTECTED]
> Subject: mysql NOT operator
> 
> Hello,
> 
> Could you please tell me how I can write an sql statement in php when I'd
> llike to select boolean search in one field like "except" or "NOT" result.
> What I mean here is that I can execute the following:
> 1.  SELECT data_id from table WHERE keyword = a AND keyword =b
> 2. SELECT data_id from table WHERE keyword = a OR keyword =b
> 
> However, NOT operator gives an error:
> 3. SELECT data_id from table WHERE keyword = a NOT keyword =b ( returns
> sql
> error)
> 
> Could you please help?
> Thank you,
> Lana
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> 




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to