Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: mysql_num_rows() expects parameter 1 to be resource, object given [duplicate]

Tags:

$q="SELECT * FROM tbl_quevote WHERE que_id = '".$qid."' and voteby='".$uid."'";

$result = $mysqli->query($q) or die(mysqli_error($mysqli));
$num_rows = mysql_num_rows($result);

echo $num_rows;

Error:

Warning: mysql_num_rows() expects parameter 1 to be resource, object given in C:\xampp\htdocs\shizin\voting.php on line 13

How to check result is empty?