I keep getting a "Supplied argument is not a valid MySQL result resource" on line 7 of this bit of code.
Can anyone help?
<?php
require("func_connect.php");
connect ("localhost","tantrum");
$result = mysql_query("SELECT * FROM tantrum WHERE company=$company");
if ($data = mysql_fetch_array($result)) {
do {
$thumbnail = $data["thumbnail"];
$id = $data["id"];
echo "<a href=\"show_product.php?id=$id\">
<img src=\"$thumbnail\" hspace=\"5\" border=\"1\"></a>";
}
while ($newsrow = mysql_fetch_array($result));
}
else {
echo "No items at this time.";
}
?>
a beginner says thanks in advance,
dast