RE: [PHP] Supplied argument is not a valid MySQL result resource
| From: | Matt Williams | Date: | Thu, 08 Nov 2001 15:38:49 +0000 |
| Subject: | RE: [PHP] Supplied argument is not a valid MySQL result resource | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73891@lists.php.net to get a copy of this message | ||
> $gi = "Y";
> $sqlf = "SELECT * FROM products WHERE collection_id = $id AND
> group_image = $gi ORDER BY
> sort_order ASC";
> $resultf = mysql_query($sqlf);
> while ($group_images = mysql_fetch_array($resultf)) {
> $list_images .= "<a
> href=test3.php?id=".$group_images["prod_id"]."><img
> src=\"images/product/".$group_images["product_image"]."\"
> border=\"0\"
>
> alt=\"".$group_images["product_name"]."\"></a><br>";
> }
Hi
Presumably you already connected to the db?
Try putting quotes around your variables in the query
M: