Hi all,
I've taken the advice of some of you guys and broke my large tables into several smaller ones. Now I want to display all data into one form and I've written the code but somehow I get an error
here's a snippet of the code
<php>
$result = mysql_query("SELECT * FROM $group_id",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "</p>";
echo "<center>Producten</center>";
echo "</p>";
echo "<center><table border=1>\n</center>";
echo "<tr><td width=150>Groepnummer</td><td width=150>Productnummer</td><td width=400>Naam</td></tr>\n";
do {
printf("<tr><td>%s</td><td>%s</td><td>%s</tr>\n", $myrow["group_id"], $myrow["product_id"], $myrow["name"]);
}
while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
echo "</p>";
echo "<center>Toe te voegen product</center>";
?>
</php>
but now I get the following error :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in \www[url]www.xxx.xxx\xxx.php[/url] on line 11
I've tried rewritting it and using other names for table and stuff but it doesn't help a bit?
If someone could tell me where the error is in the code and what to do to change it???
Greetz and thx in advance
EDIT: posted the wrong piece of code changed now !!!