EDIT: Just to clarify, the query is correct - there are zero rows - the problem I am having is how to handle that in the PHP with the IF basically I am iterating through rows (10 of them) some will have some data for the query and some won't. The page falls over when a row doesn't. Does that make any sense?
I know I'm doing something inherently wrong and I am sure the solution is simple...
MySQL query brings back ZERO rows;
SELECT * from tresults WHERE date = 'MAY2012'
I then have some PHP code as follows:
if($row = mysql_fetch_array($result)){
// do something
}
Now, as the query brings back ZERO rows, the page falls over on the IF statement...what am I doing wrong....
SELECT * from tresults WHERE date like '%MAY2012%'whileinstead ofifstatement...