Hello I have a simle question, I think.
I am trying to get all results that match three variables submitted through a form. I use the following command.
<?php
$result = mysql_query("SELECT * FROM videos WHERE Artist LIKE '%$Artist%' AND Show LIKE '%$Show%' AND Tape LIKE '%$Tape%'",$db);
while ($myrow = mysql_fetch_array($result) and $i != $display ) {
printf("<tr><td><center>%s</center></td><td><center>%s</center></td><td><center>%s</center></td><td><center>%s</center></td><td><center>%s</center></td><td><center>%s</center></td></tr>\r\n", $myrow["Artist"], $myrow["Show"], $myrow["Year"], $myrow["Length"], $myrow["Quality"], $myrow["Tape"]);
$i++;
}
?>
This works if I remove the Show and Tape search? But get the following error if I dont:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/html/videos.php on line 109
Anyone have any ideas?
Thanks