HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
HTML Tutorial

CSS Tutorial

Uncaught error call to undefined function mysql_num_rows()



Fatal error: Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in - how to solve it?


Example

<?php

$link = mysql_connect("localhost", "user", "password", "database");
/* check connection */
if (!$link) {
die ('could not connect: ' . mysql_error());
}
else {
printf("name to find " .$_POST["name"]."<br />");
$name_search_sql="SELECT * FROM tbl_guests WHERE guestname = '".$_POST['name']."'";
$name_search_res=mysql_query($name_search_sql) or die(mysql_error($mysql));
if (mysql_num_row($name_search_res) < 1) {
printf("noname");
}
else {
while ($new = mysql_fetch_array($name_search_res)) {
$new_name=$new['guest_name'];
printf("name: ".$new_name);
}
}
/* close connection */
mysql_close($link);
}
?>


I have this error Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in - how to solve it?


mysql_num_rows Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in - php mysqli

3272. Mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given, php mysqli
Mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given php mysqli
https://www.agernic.com/php-mysqli/mysqli_fetch_array()-expects-parameter-1-to-be-mysqli_result-boolean-given.html

3271. How to prevent sql injection in php mysqli, php mysqli
How to prevent sql injection in php mysqli php mysqli
https://www.agernic.com/php-mysqli/how-to-prevent-sql-injection-in-php-mysqli.html

1269. mysqli_num_fields to get number of fields or columns in a result set returned from database
mysqli_num_fields to get number of column from resultset in PHP MYSQLI
https://www.plus2net.com/php_tutorial/mysqli_num_fields.php

3270. Deprecated: mysql_connect() mysql extension is deprecated and will be removed, php mysqli
Deprecated: mysql_connect() mysql extension is deprecated and will be removed php mysqli
https://www.agernic.com/php-mysqli/deprecated-mysql_connect()-mysql-extension-is-deprecated-and-will-be-removed.html

1265. mysqli_fetch_field_direct to get field meta data
mysqli_fetch_field_direct to get field meta data in PHP MYSQLI
https://www.plus2net.com/php_tutorial/mysqli_fetch_field_direct.php

3284. PHP mysqli_query() Function - mysqli query, sql tutorial
PHP mysqli_query() Function - mysqli query sql tutorial
https://www.agernic.com/sql-tutorial/php-mysqli_query-function-database-mysqli.html

Your add here
How to get PHP errors to display?
How to prevent sql injection in php mysqli
How do I get PHP errors to display - PHP error_reporting()
mysql_query(): The mysql extension is deprecated and will be removed i
Function eregi_replace() is deprecated in php - How to fix
PHP delete an element from an array
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
Deprecated: mysql_connect() mysql extension is deprecated and will be
mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean g
SQL IN Operator - example
SQL BETWEEN Operator
SQL like syntax and example
SQL WHERE AND & OR multiple conditions
SQL create table primary key autoincrement
PHP mysqli_connect () Function
SQL COUNT(), AVG() and SUM() Functions
Display data from SQL database with MySQLi into php - html table
SQL CREATE DATABASE - example
SQL mysql order by columns, by date, by asc, by desc, random with PHP
PHP mysqli_query() Function - mysqli query
SQL delete row - SQL delete table
SQL update - SQL update select
Insert into SQL - Insert into table SQL - Insert data in sql
Login in PHP - simple login script with PHP MYSQL