It seems as though I have a problem i can`t solve... I´m not advanced enough to see what I´m doing wrong.
I keep getting this error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
PHP:
<?
$name = $HTTP_POST_VARS["name"];
$db = mysql_connect("localhost");
mysql_select_db("feedback", $db);
$query = "select * from shops where name like ?%".$name."%?";
$result = mysql_query($query);
while ($record = mysql_fetch_assoc($result)) {
while (list($fieldname, $fieldvalue) = each ($record)) {
echo $fieldname.": ".$fieldvalue."<BR>";
}
echo "<BR>";
}
?>
I am assuming it has something to do with where name like ?%".$name."%? because the error doesn´t show when this part is deleted...😕