purpleoak
asked on
Mysql select where not euqal to array values
i need to do a select where a particular field is not equal to any of the values in the array. so for instance my array has
133007
133005
133090
mysql_query("SELECT partnumber FROM table WHERE ordernumber != arrayvalues")
The issue is the amount in the values can change and potentially be 20/30 values.
133007
133005
133090
mysql_query("SELECT partnumber FROM table WHERE ordernumber != arrayvalues")
The issue is the amount in the values can change and potentially be 20/30 values.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:) Gotta try and catch you guys up eh?
hi, another way is
WHERE not fieldname IN (ListOfValues)
WHERE not fieldname IN (ListOfValues)
WHERE * from Table Where FieldName Not IN (ListOfValues)
ASKER
Thank you very much. Exactly what i needed. Sorry i didn't reply sooner. I thought i would post and leave over night. Guess i didn't need to wait all that long.
Glad to help.. thanks for the points..
I need to go disable your internet connection so I can get a chance to answer the questions. :)