Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I used the conditional clause: `
$link = mysql_connect("localhost", "root", "");
mysql_select_db("dvddb", $link);
$sql = "SELECT id, title, genre, format, year,FROM dvd WHERE title LIKE 'T%'";
$result = mysql_query($sql, $link);
?>`
However, I get an error: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\moviesort.php on line 114
where 114 is this line:
<?php while ($row = mysql_fetch_assoc($result))
the full code containing line 114 is as follow:
<ul class="grid">
<?php while ($row = mysql_fetch_assoc($result))
{ ?>
<li>
<p class="image">
<a href="synopsis.php?id=<?php echo $row['id']; ?>">
<img src="getImage.php?id=<?php echo $row['id']; ?>" alt="" width="175" height="200" />
</a>
</p>
<p class="name"><?php echo $row['title']; ?></p>
<p class="genre"><?php echo $row['genre']; ?></p>
<p class="format"><?php echo $row['format']; ?></p>
<p class="year"><?php echo $row['year']; ?></p>
</li>
<?php } // while
?>
</ul>
anybody knows what did i do wrong?