dazzclub Posted June 12, 2008 Share Posted June 12, 2008 Hi guys and girls.. I was originally having a problem with something else which made me want to view my site in note pad from the view source in the browser...I was reading the code and i had noticed this.. <br /> <b>Warning</b>: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>C:\wamp\www\darrensPAINT\density-graphs.php</b> on line <b>94</b><br /> </select> I was surpised i had not seen it in the browser first..anyway.. I tracked it down to line 94 and looked at the lines previous to help me spot the problem..I then read a tutorial by Ben Smithers on, "Debugging: A Beginner's guide" on phpfreaks and i tried to echo out the problem, as this was suggested to be a good method but i think i messed up somewhere. here is the code thats causing the error, along with my attempt at echoing out the problem //third dropdown list echo "<select name='time'><option value=''>Select time</option>"; while($selectiontime= mysql_fetch_array($querytime) or trigger_error(mysql_error().'<br />Query was:'.$selectiontime); echo '<br />'.Query was:'.$selectiontime.'<br />'; If anyone can help, that would be great cheers Darren Quote Link to comment Share on other sites More sharing options...
xtopolis Posted June 12, 2008 Share Posted June 12, 2008 $selectiontime is an array that holds the results of the resource $querytime has from mysql. You need to echo the same $variable that is in the "mysql_query($variable)" area in order to debug to see that what you're asking mysql for. Also, it would help us to have more code, specifically what sql you're sending. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.