This error is because the previous call to mysql_query
is not producing a result set, but a false
stating that the query had failed.
mysql_query() or die(mysql_error());
to see the problem. try the above code. From the code you have posted $tbl_name
is not a visible variable name.