Click here to Skip to main content
15,896,522 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
include('dbcon.php');
?>
<html>
<head>
<title>kerintha</title>
</head>
<body>

$query=mysql_query("SELECT * FROM table where category=' '; " );
while($table=mysql_fetch_array($query))
{
?>

<img src="" height="100" width="100"/>

</body>
</html>
Posted
Updated 11-Aug-15 0:13am
v2

1 solution

mysql_query[^] not always returns a resultset, but FALSE if an error occurred, that's what happening to you and that's the reason of the error...
Check the result ($query) and if false use mysql_error() to see what went wrong...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900