PHP : mysqli_num_rows — 결과 집합의 행 수를 가져오기
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);$mysqli = new mysqli("localhost", "my_user", "my_password", "world");$result = $mysqli->query("SELECT Code, Name FROM Country ORDER BY Name");/* Get the number of rows in the result set */$row_cnt = $result->num_rows;printf("Result set has %d rows.\n", $row_cnt);