MySQL Forums
Forum List  »  Newbie

Re: What the heck?
Posted by: Roland Bouman
Date: July 16, 2005 02:32PM

By the way, you saw that in your second post, you connect to "locahost" instead of "localhost"?

My PHP manual says:

For SELECT, SHOW, DESCRIBE or EXPLAIN statements, mysql_query() returns a resource on success, and FALSE on error.

so, maybe you should not check

== 0

but

=== FALSE (yep, three times =)

to see of mysql_query() returns successfully.

As for any other ideas, when going by the manual, it seems allright, but i never do it this way, i always pass resources explicitly. Try it, see if it changes anything at all when you pass the connection resource explicitly to mysql_query.

Options: ReplyQuote


Subject
Written By
Posted
July 16, 2005 09:40AM
July 16, 2005 09:50AM
Re: What the heck?
July 16, 2005 02:32PM
July 16, 2005 11:54AM
July 16, 2005 02:12PM


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.