MySQL Forums
Forum List  »  PHP

Re: Strange issue connecting to MySQL from PHP
Posted by: Bob Field
Date: May 04, 2006 06:01PM

In the line "$result = mysql_query($query);" you don't check to see that $result contains a valid resource id. Generally you want to tack on "or die(mysql_error())" to get error messages returned. My guess is you have an error in your query somewhere. In the event of error you should also echo the contents of the $query variable for debug purposes.

Options: ReplyQuote


Subject
Written By
Posted
Re: Strange issue connecting to MySQL from PHP
May 04, 2006 06:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.