Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource problem
This is part of a dynamic menu on the website, where I'm taking the name of the collections from the database. This is my database structure
id INT (11)
name VARCHAR (255)
And this is my script
<?php
include("connect.php");
$query = mysql_query("SELECT * FROM collections");
while($row=mysql_fetch_array($query)){
echo '<li><a href="photohandler.php?c='.$row['id'].'" class="parent"><span>'.$row['name'].'</span></a>';
}
?>
I receive the error:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in index.php on line 107