I am setting some default values on a call to a database I want the defualt to be Everything in the array is there like a WHERE color = ALL or something like that I am guessing WHERE color = "" will return only rows where the values is Null
You could try fulltext matching. onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html Just add the fulltext property to the field which you're looking for, and then implode the array like so: $colours = array('red', 'green', 'blue'); $colour_search_string = implode(',', $colours); mysql_query("SELECT * FROM database WHERE MATCH(color) AGAINST ('".$colour_search_string."')"); PHP: I hope this helps. (Sorry I couldn't provide a full link, since this forum has a stupidly restrictive posting rule for newbies. They obviously don't think past the fact that some people might want to provide useful data.)
nice that might work i just did a != ISSET and gave null as the result else do the query statement but your way is much simpler
That's what he should be using... Besides, CP, WHERE color = "%" won't work, wildcards are only applicable when LIKE is used, e.g.: WHERE color LIKE '%'