PHP beginner |
|
Hallo,
ik heb deze code, maar hij geeft de volgende fout:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/shamrock/public_html/paginas/beheer/productenlijst.php on line 52
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/shamrock/public_html/paginas/beheer/productenlijst.php on line 52
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/shamrock/public_html/paginas/beheer/productenlijst.php on line 52 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/shamrock/public_html/paginas/beheer/productenlijst.php on line 52
If($_SERVER['REQUEST_METHOD'] == "POST")
{
echo "<div id=\"PrintKlaar\">";
foreach($_POST['select'] as $select){
$print = mysql_query("SELECT * FROM cms_pro_soort WHERE id='".$select."'");
while ($plist = mysql_fetch_assoc($print)) {
$print2 = mysql_query("SELECT * FROM cms_pro_producten WHERE categorie='".$plist['pro_cat']."' AND soort='".$plist['titel']."'");
while ($plist2 = mysql_fetch_assoc($print2)) {
echo "".$plist2['type']."";
}
}
}
echo "</div>";
echo "<a href=\"javascript:void(PrintPagina())\">Deze pagina afdrukken</a><br>";
}
else
{
If($_SERVER['REQUEST_METHOD'] == "POST") { echo "<div id=\"PrintKlaar\">"; foreach($_POST['select'] as $select){ $print = mysql_query("SELECT * FROM cms_pro_soort WHERE id='".$select."'"); $print2 = mysql_query("SELECT * FROM cms_pro_producten WHERE categorie='".$plist['pro_cat']."' AND soort='".$plist['titel']."'"); echo "".$plist2['type'].""; } } } echo "<a href=\"javascript:void(PrintPagina())\">Deze pagina afdrukken</a><br>"; } else {
regel 52 is de 2e query en dan de while (hier dus regel 10)
(while ($plist2 = mysql_fetch_assoc($print2)) { )
|