Fastest Web Hosting

mysql_num_rows is not working

0 votes
asked Nov 9, 2016 in PHP by anonymous
$query = "select * from users where online_status = 1";
$result = mysql_query($query);
$num = mysql_num_rows($query) ;
if($num > 0)
  echo 'Number of users '.$num;
echo 'No user found '.;

Above is my code that is giving me error i.e. mysql_num_row need resources id..... please help anyone expert

Your answer


Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's