hi friends!
i'm trying to convert my app from mysql to mysqli and I have a problem with this query
old (it works and it prints the total number of records)
$total = mysql_result(mysql_query("SELECT COUNT(id) FROM table"), 0);
echo $total;
new (doesn't work: it only prints the number 1)
$total = mysqli_num_rows(mysqli_query($db, "SELECT COUNT(id) FROM table"));
echo $total;
Can you help me to edit this code? thanks a lot!