newbie : trying to count records in mysql table
Help, I get no output on this code
// Connect to database.
$dbh = mysql_connect("localhost","user","password");
mysql_select_db("survey");
$query = "select count(*) from response1";
$result = mysql_query($query, $dbh);
while ($rows = mysql_fetch_row($result)) {
$count = $rows[0];
}
print $count;
any one have any Ideas ?
Thanks in advance
Jim
|