Re: Re: Mysql DB connect failure

From: Date: Fri, 21 Feb 2003 16:27:46 +0000
Subject: Re: Re: Mysql DB connect failure
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136532@lists.php.net to get a copy of this message
Thanks rick, that is a much cleaner solution! "Rick Emery" <remery@emeryloftus.com> wrote in message news:009f01c2d9c1$51171d20$0500a8c0@honeybee... > $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 (#136532) next »