Row count
Posted: Wed Jun 23, 2010 11:31 am
Hi eveyone this code is correct or not ?? because im gettin this error
not:i didnt write just copy paste and it works there
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\Page\index.php on line 7
<?php
$con=mysql_connect("localhost","root","") or die ("Mysql Error");
$db=mysql_select_db("ziyaretci") or die ("Connection Error");
$rec_count=mysql_fetch_array(mysql_query("SELECT count (*) from memberinfo"));
echo $rec_count;
?>
not:i didnt write just copy paste and it works there
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\Page\index.php on line 7
<?php
$con=mysql_connect("localhost","root","") or die ("Mysql Error");
$db=mysql_select_db("ziyaretci") or die ("Connection Error");
$rec_count=mysql_fetch_array(mysql_query("SELECT count (*) from memberinfo"));
echo $rec_count;
?>