Re: Code Troubles
| From: | Chris Wesley | Date: | Fri, 26 Apr 2002 16:36:27 +0000 |
| Subject: | Re: Code Troubles | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94749@lists.php.net to get a copy of this message | ||
if( $db ){
@mysql_select_db($db) or die("The site database is unavailable.");
}
To debug, use print( mysql_error ) instead of die to figure out what's
going on. It's not that far of a leap in logic.
~Chris /"\
\ / Microsoft Security Specialist:
X The moron in Oxymoron.
/ \ http://www.thebackrow.net
On Fri, 26 Apr 2002, Miguel Cruz wrote:
> On Fri, 26 Apr 2002, Chris Wesley wrote:
> >> if ($db!="" and !@mysql_select_db($db))
> >> die("The site database is unavailable.");
> >
> > you probably want an "or" before that die().
>
> How would that work?
>
> miguel
>
>