Looks like a perl script, so you can use 'or' (||) to evaluate your
'connect' string, i.e.

To stop the script if connect fails use
$dbh = DBI->connect("dbi:mysql:database:localhost",'user','password') || die
"No connection to database";

To issue a warning only
$dbh = DBI->connect("dbi:mysql:database:localhost",'user','password') ||
print "Database connect failed";


Regards,

Sebastiaan J.A. Kamp
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 1:34 PM
Subject: DBI->connect


how can I test DBI->connect ?
I'm geting this error:
Software error:
Execution of /var/www/cgi-bin/mySQL.pl aborted due to compilation errors.


Yann carlier
+351-21-4527104/5
www.inteliware.net
[EMAIL PROTECTED]



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to