PHP Warning, supplied argument is not a valied mysql result resource.
What does the above mean, it was in my server logs?
The below code is not working and causing the above error:
Please can you help me out with my snippet.
<?php
$contest="roundTable";
$result = mysql_query("SELECT * FROM contests WHERE ContestName = $contest",$db);
printf("Contestant ID: %s<br>\n", mysql_result($result,0,"Contestant_ID"));
printf("Age: %s<br>\n", mysql_result($result,0,"Age"));
printf("First Name: %s<br>\n", mysql_result($result,0,"Fname"));
?>
Does anyone know why my code doesn't work?
Can anyone show me how I could do this:
Contestand ID First Name Last Name
$contestant_ID $fname $lname
$contestant_ID $fname $lname
$contestant_ID $fname $lname
$contestant_ID $fname $lname
$contestant_ID $fname $lname
So it would list all the entries that conforms to the SQL criteria.
Any help would be much appreciated!