Hi
can anyone tell me what the value of a query is if its empty. for instance
$result= "SELECT * FROM ..."
if ($result == 0) {
I assume that 0 is not the value for an empty query. any ideas??
It will mean there has been an error of some sort - most commonly a mal-formed query.
Hope this helps 😉
well what i mean is that what is the code to check that a query string is empty. Ive tried
($result == 0)
but this doesn't work. Does anyone know?
if (mysql_num_rows($result) == 0) {
will check to see if the query returned a result set containing 0 rows.