MySQL Forums
Forum List  »  PHP

Re: Problem: mysql queries does no return result....
Posted by: Brian Moon
Date: December 07, 2005 07:24AM

Try this for error catching instead.

$link = mysql_connect("localhost","root","");
if($err=mysql_error()) die("Could not connect to database. Server said: $err");

mysql_select_db("helpdesk2", $link);
if($err=mysql_error()) die("Could not select database. Server said: $err");

$Result = mysql_query("SELECT * FROM Administrator")
if($err=mysql_error()) die("Query failed. Server said: $err");

mysql_error() can give you more detail info about the error that is occuring.

Brian Moon
Phorum Dev Team
http://phorum.org/
-----------------------
dealnews.com - How to go broke saving money.
http://dealnews.com/

Options: ReplyQuote


Subject
Written By
Posted
Re: Problem: mysql queries does no return result....
December 07, 2005 07:24AM


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.