[PHP] select query question

2003-02-17 Thread Sunfire
hi i have a select query i need to do on a field in my table.. the field is
called Flags and there is 1 char for every flag that is set for a certain
group..
the flags are F S L C G R now what i want to do is search for every instance
of Flags field that has any value except L and C in it and select those
fields..

so the result would be every record that doesnt have L and C in the Flags
field would be selected.. dont know how to do this query i thought it might
be something like this:

mysql_query(select * from members where Flags not like '%l%c%'); but not
really sure.. i know to use the not like statement but its just figuring out
what search pattern to use...

tnx




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] select query question

2003-02-17 Thread Rick Emery
SELECT * FROM mytable WHERE flags NOT IN('L','C')

rick
People will forget what you said. People will forget what you did.
But people will never forget how you made them feel.
- Original Message - 
From: Sunfire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 17, 2003 11:19 AM
Subject: [PHP] select query question


hi i have a select query i need to do on a field in my table.. the field is
called Flags and there is 1 char for every flag that is set for a certain
group..
the flags are F S L C G R now what i want to do is search for every instance
of Flags field that has any value except L and C in it and select those
fields..

so the result would be every record that doesnt have L and C in the Flags
field would be selected.. dont know how to do this query i thought it might
be something like this:

mysql_query(select * from members where Flags not like '%l%c%'); but not
really sure.. i know to use the not like statement but its just figuring out
what search pattern to use...

tnx




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php