AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

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

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


0
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


CSS background color - opacity, gradient...
CSS flex - display: flex - CSS Flexbox L...
CSS border padding...
HTML text center horizontally and vertic...
HTML text input <input type="text"&g...
HTML link color...
How to Link CSS to HTML, external file n...
HTML link - hyperlink...
jQuery replace...
jQuery replaceClass...
jQuery click ()...
jQuery switchClass()...
jQuery draggable()...
jQuery HTML...
jQuery scroll smooth...
jQuery scroll()...
jQuery stop()...
jQuery animate()...
jQuery SlideToggle()...
jQuery slideDown()...