警告:mysql_num_rows()期望参数1是资源,[重复]

Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select

code-

$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?

$num_rows = $result->num_rows;

int mysql_num_rows ( resource $result ) Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that return an actual result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use mysql_affected_rows().