Page 1 of 1

displaying number of entries

Posted: Sun Mar 25, 2012 10:31 am
by abbey4biz
Hi please, I am finding it difficult to display total number of vendors in my database. The code used are:

Code: Select all

<?php

require_once ('dbc.php');
$q = "SELECT count(id) as count FROM users";
$r = @mysqli_query ($dbc, $q);
$row = @mysql_fetch_array($r, MYSQLI_NUM);

?>
<font face="Tahoma" size="2" >Vendors online: <?php echo $row['count']; ?></font>

Re: displaying number of entries

Posted: Sun Mar 25, 2012 4:52 pm
by requinix
You can't mix mysql with mysqli. Pick one to use and stick with it.