Please Help with this error
Posted: Tue Jul 29, 2008 10:18 pm
Everah | Please use code tags when posting code in the forums.
Dear Developers,
Have developed a simple code to access MySQL on a local machine and it worked well. When I upload it to the webserver host I am getting this:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in line 14
here is the code
Kindly advise what to do.
Thanks
Dave
Dear Developers,
Have developed a simple code to access MySQL on a local machine and it worked well. When I upload it to the webserver host I am getting this:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in line 14
here is the code
Code: Select all
<?php
include ("DBcon.php");
$query = "select * from booth_table WHERE Name_of_Co ='' ORDER BY Booth_No ";
$result=mysql_query($query);
mysql_close();
//this is line 14
$num=mysql_num_rows($result);
$i=0;
while($i<$num){
$output=mysql_result($result,$i,"Booth_No");
echo "Booth No: $output <br> ";
$i++;
}
?>Kindly advise what to do.
Thanks
Dave