mysqli_num_rows() expects parameter 1 to be mysqli_result, object

前端 未结 3 1818
天命终不由人
天命终不由人 2020-12-11 22:10

This is my first experience with mysqli. It seems to be looking for the name of a result set in between the parentheses in mysqli_num_rows(). Yet when I tried $stmt, $conn,

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 22:51

    mysqli_num_rows takes the query result as a parameter http://us.php.net/manual/en/mysqli-result.num-rows.php

    You could also use it in an OOP style as $result->num_rows;

提交回复
热议问题