MySQL Forums
Forum List  »  Newbie

simple mysql query...
Posted by: Gawie Marais
Date: October 31, 2005 08:28AM

I have the following query :-
SELECT count(sid) FROM system WHERE customercode = '$customercode' AND pkgid = '9' or pkgid = '10' or pkgid = '11' or pkgid = '12'

its returning the count for all records where customercode = $customercode in stead of also taking into account that pkgid must also be = to 9,10,11,12

any help appreciated !

Options: ReplyQuote

Written By
simple mysql query...
October 31, 2005 08:28AM
October 31, 2005 09:03AM
October 31, 2005 01:04PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.