I am trying to do a select that only returns rows that are between two dates, have a status not equal to certain values and has a postal code that is not null. I have tried this several ways and it works great UNTIL I add the postal code test.
Seems to be a problem with my not null expression but I am frustrated and have been looking at it too long.
$values = mysql_query('SELECT * FROM raw_leads WHERE `raw_leads`.`entry_date` BETWEEN "' . $begin_date . '" AND "' . $end_date . '" AND `raw_leads`.`status` NOT IN ("SALE", "DNC", "SRV") AND `raw_leads`.`postal_code` IS NOT NULL LIMIT ' . $limit);
Any thoughts..??