Рафаэль
Новичок
Добрый день, хочу узнать как исправить ошибку:
Выдаёт в браузере:
Fatal error: Uncaught Error: Call to undefined function mysqli_numrows() in .../new_messages.php:6 Stack trace: #0 .../loginpage.php(2): include() #1 {main} thrown in .../new_messages.php on line 6
PHP:
<?php include("config.php");
$connection = mysqli_connect("$server", "$db_user", "$db_pass");
$db = mysqli_select_db($connection, "$database");
$query = "SELECT * FROM usermessages WHERE `to`='$username' AND `new`='yes'";
$result = mysqli_query($connection, $query);
$newmessages = mysqli_numrows($result);
if($newmessages=='0')
{
echo "<a href=\"usermessages.php\">";
echo "$lang[nonewmessages]";
echo "</a>";
}
else
{
echo "<a href=\"usermessages.php\">";
echo "$newmessages $lang[newmessages]";
echo "</a>";
}
?>
Fatal error: Uncaught Error: Call to undefined function mysqli_numrows() in .../new_messages.php:6 Stack trace: #0 .../loginpage.php(2): include() #1 {main} thrown in .../new_messages.php on line 6