Fw: [PHP] Re: Mysql DB connect failure

From: Date: Fri, 21 Feb 2003 15:53:02 +0000
Subject: Fw: [PHP] Re: Mysql DB connect failure
Groups: php.general 
Request: Send a blank email to php-general+get-136523@lists.php.net to get a copy of this message
$db = mysql_pconnect("localhost", "test1", "test1") or die(mysql_error()); ----- Original Message ----- From: "ML" <slickmik@eden.rutgers.edu> To: <> Sent: Friday, February 21, 2003 9:33 AM Subject: [PHP] Re: Mysql DB connect failure Where exactly would I put the print mysql_error() ? Here is the code... <?php @ $db = mysql_pconnect("localhost", "test1", "test1") or die("<body bgcolor='#000000'> <br> <div align='center'><table border='22'><tr><td> <img src='./images/dbdownw.jpg'> </td></tr></table></div> </body>"); "Hans Prins" <HPrins@xgn.nu> wrote in message news:20030221152958.69624.qmail@pb1.pair.com... > did you try: > print mysql_error(); > > "Ml" <slickmik@eden.rutgers.edu> schreef in bericht > news:20030221152240.57775.qmail@pb1.pair.com... > > Currently I have some php code that displays a message if a connect to my > > database fails. Is there anyway I > > can get a more descriptive error message? So I can see exactly why my php > > can't connect to the Database? > > I am pretty sure that the username and password are correct and the > username > > exists as a mysql user... > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#136523) next »