This message is driving me NUTS! Would appreciate some insight.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/garylee/ndorfnz-www/races.php on line 339
Here is my code:
$querydetail = "SELECT *, DATE_FORMAT(rundate,'%W, %M %d, %Y') as wdate from races where workout_type = 'Race' and $year = $yearsel and distance = '$distancesel' order by rundate DESC";
$resultdetail = mysql_query($querydetail);
while ($row2 = mysql_fetch_array($resultdetail))//this is line 339
{
echo blah, blah, etc.
}
$yearsel and $distancesel are drop down select boxes where user selects a value that is populated from a mysql db.
When the user selects these values and clicks submit, I am using PHPSELF to post and run the appropriate query to extract and display data.
I had the column type for distance at float, but major compare issues there. So I changed to varchar, which should work! But still getting the error within the while ($row2 = mysql_fetch_array($resultdetail))
The page works on intial load since I am selecting * by default. However once I start making selections I get the above problem.
page is here:
http://www.ndorfnz.com/races.php
Thanks much!!!