Re: I hate bugs...Mysqli issue

From: Date: Mon, 31 Dec 2007 20:30:16 +0000
Subject: Re: I hate bugs...Mysqli issue
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-266439@lists.php.net to get a copy of this message
On Fri, December 21, 2007 10:50 am, Jason Pruim wrote: > <?php > > > > $link = mysqli_connect($server, $username, $password, $database) ; > > /* check connection */ > if (mysqli_connect_errno()) { > printf("Connect failed: %s\n", mysqli_connect_error()); > exit(); > } > > > > ?> > It looks valid to me... as long as it's connecting... the username/ > password/database are all correct, I can log in from the command line > with no issue.... Perhaps it is valid, when the database is up and running. But if your DB was re-started for some reason, the link won't be there while it's restarting will it? You've GOT to write code to handle the $link being false instead of marching blindly off the cliff. You are not a lemming. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.general (#266439) next »