Empty query result
Posted on 2000-03-13
When I perform an ordianry SELECT query in PHP (on a MYSQL database), I always get an error message when my query returns an empty set. Something like not valid Query. There is no such error message when I execute the same query directly in MYSQL, I just get empty set as result.
The only way I have found to work around this problem is to perform my query with a SELECT COUNT(*) ... the first time, to check if there is a valid result and to perform the query afterward. Has anybody a better to solve this problem ?