Possible Duplicate:
PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given
Hello everyone and good day to all
I have a very strange error this morning and iv been trying to solve it for the past 4 hours with no success.
After executing the below code i get this error:
mysql_num_rows() expects parameter 1 to be resource, boolean given in
$per_page = 4;
require_once('Connections/webiceberg.php');
$sql = "select * from services" ;
$rsd = mysql_query($sql);
$count = mysql_num_rows($rsd);
$pages = ceil($count/$per_page);
But then when i edit this line of code to give me an error i get No Database Selected.
$count = mysql_num_rows($rsd) or die (mysql_error());
Whats up , how can i fix this, why is this happening, its like it cant connect to the db even when on another page iam viewing records from the same table just fine. Any help will be most appreciated.