I have a query which is to check data from two different tables everything is working fine though. When i paste the query in cPanel then result is showing like this
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0005 sec)
but when i count the query in php it is returing 1 instead of 0 don't know why Here is my Sql query
SELECT mobile, emailid
FROM tbl_users
WHERE mobile =9653878051
AND emailid = 'rawat@gmail.com'
GROUP BY mobile
UNION ALL SELECT mobile, email
FROM tbl_addusr
WHERE mobile =9653878051
AND email = 'rawat@gmail
.com'
LIMIT 0 , 30
and i am counting it like this i am storing the sql result in data variable
$result = mysql_num_rows($data);
echo count($result)>0?1:0;
and it is resulting 1 instead of 0