Hey guys, I need your help. What can be my problem why its giving me this Errror as mentioned in the Title?
Here is my code:
if (!$connect){
die("Failed to connect to the database: ".mysql_error());
}
$kies_bd = mysql_select_db("eraenz_db1",$connect);
if (!$kies_bd){
die("failed to choose from BD: ".mysql_error());
}
$query = mysql_query("SELECT ListNumber FROM residential");// or die($myQuery."<br/><br/>".mysql_error());
$result1 = mysql_fetch_assoc($query) or die($myQuery."<br/><br/>".mysql_error());
echo $result1;
if (mysql_num_rows($result1) >10){
$difference = mysql_num_rows($result1) - 10;
$myQuery = mysql_query("SELECT * FROM residential ORDER BY ListNumber LIMIT 10,". $difference) ;
mysql_num_rows function accept resource identifier
in your case it is
$queryNote that$result1is the fetched array and contain the data from database that should not be passed in this function.And I would suggest you read the manual before asking quesions