When i try to run this code i get the error:
"Warning: mysql_fetch_array() expects parameter 1 to be resource, string given"
i've been trying to debug it but i cant seem to.
it's connecting to a table with 6 fields:
id (int) | name (varchar) | image (BLOB) | description (text) | url (text) | keywords (text)
Could anyone try to fix this?!?!?!
the function is written below....
function get_images()
{
$limit = 5;
$count = 0;
$row = mysql_fetch_array("SELECT * FROM images");
echo "<table border='1'>";
while($row)
{
$img = $row['name'];
if ($count < $limit)
{
if($count == 0)
{
echo "<tr>";
}
echo "<td>$img</td>";
}
else
{
$count = 0;
echo "</tr><tr><td>$img</td>";
}
$count++;
}
echo "</td></table>";
}