PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?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++;
}
?>
$result=mysql_query($query) or die(mysql_error());
And you should receive an error message with more specific information about why your query is not returning any results.
Remember to change the line back once you've fixed the problem though otherwise people may see specific information about your database structure which is a security issue.