For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > February 2007 > Checking for ADO errors









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Checking for ADO errors
Todd Cary

2007-02-15, 6:59 pm

Is there a better way to check for ADO errors than what I have
done here using the die()?

$dbh = db_open($dbserver, $user, $password, $database) or die
("Cannot open database");
if ($dbh) {
$stmnt = "SELECT BadFieldName FROM MC";
$rs = $dbh->Execute($stmnt) or die("Cannot execute db_test");
}
if ($rs) $rs->close();
if ($dbh) $dbh->close();
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com