Re: mysql_connect problem
| From: | Miles Thompson | Date: | Mon, 02 Feb 2004 15:46:30 +0000 |
| Subject: | Re: mysql_connect problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32757@lists.php.net to get a copy of this message | ||
At 03:42 PM 2/2/2004 +0100, DiZEM PGC wrote:
I try connecting to an existing mysql DB. The first time I directly called mysql_connect with all required params (Path/Database,User,Password) and established a connection without problems. Second time I have used a script that includes a self-written class containing a few Database functions. One of these functions, named 'db_login', does exactly the same as mysql_connect (w. the same params). First case (directly calling) works fine. The second case doesn't report any error and doesn't establish a connection. What could be the reason for this strange behavior ? DiZEM<promo crap snipped> Echo the mysql_error and mysql_errno as found here: http://www.php.ca/mysql_error Also echo the connect string so you can see exactly what's being sent. I'd bet on a misplaced quotation mark. Cheers - Miles