----- Original Message ----- From: "R0x0r Mc0wnage" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 8:49 PM Subject: Re: [PHP] Functions and arguments
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result > resource in > /home/virtual/site125/fst/var/www/html/atracker/assignments/index.php on > line 15 > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL > result resource in > /home/virtual/site125/fst/var/www/html/atracker/assignments/index.php on > line 33 > Would I be getting this kind of error if $id was not set correctly? I was > doing a bit of testing and for some reason my sessions aren't registering or > something :\ Yes. You should always check the result of the mysql_query statement, and take some action if it returns false. False means the query failed (and not that there were no rows returned), so you should at least log the error from mysql_error(), maybe email it to someone that can do something about it, and perhaps do more depending on the situation. You shouldn't echo mysql_error() out to the browser, except while debugging, so as to prevent information leakage to the bad guys. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php