This is the error I get:

Warning: mysql_connect(): Can't connect to MySQL server on 'host' (111) in
/path/to/program.php on line 48

And that's all the output there is. So without the 'or die', the error shows
up but it contiues on. Maybe it's 'cause I have errors on right now.

Maybe Pear::DB works differently. I'll have to try that sometime also.
mysql_connect is so easy though.

-Josh

> -----Original Message-----
> From: tclug-list-bounces at mn-linux.org
> [mailto:tclug-list-bounces at mn-linux.org]On Behalf Of Dave Dash
> Sent: Wednesday, March 10, 2004 2:11 PM
> To: TCLUG Mailing List
> Subject: Re: [TCLUG] mysql_connect with php
>
>
> Josh Close wrote:
>
> >Is there a way to have php continue if a connect fails for
> mysql_connect( )?
> >
> >Say, instead of doing 'or die(mysql_error( ));'.
> >
> >-Josh
> >
> >_______________________________________________
> >TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> >http://www.mn-linux.org tclug-list at mn-linux.org
> >https://mailman.real-time.com/mailman/listinfo/tclug-list
> >
> >
> just don't do or die ;)
>
> a failed connection shouldn't halt everything.
>
> also, you may want to use Pear::DB
>
> -dd
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org tclug-list at mn-linux.org
> https://mailman.real-time.com/mailman/listinfo/tclug-list
>


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list