I have the following code that works great at constructing a query where a column is NULL as well as a few other criteria. The only problem is that I need to allow for the SPG_Suppress column to be empty. I've tried OR, AND and LIKE as well as range like > '' as found here.
I think I may have an issue with the syntax but can't narrow it down. Can someone show me the best way to construct this?
$res = mysql_query('SELECT * FROM ' . DB_TABLE
. ' WHERE SPG_Suppress IS NULL AND SPG_CallType = \'' . mysql_real_escape_string($callType) . '\'
AND SPG_Brand = \'' . mysql_real_escape_string($brand) . "'" . ' ORDER BY SPG_KeyWord ASC');