Stopping display of DB errors
| From: | Todd Cary | Date: | Thu, 06 Jan 2005 17:36:02 +0000 |
| Subject: | Stopping display of DB errors | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-38019@lists.php.net to get a copy of this message | ||
When I run a query using Interbase and if an error occurs, the error displays in the browser window even though I am testing for errors. Is there a way to prevent this?
function db_insert_logon_session($dbh, $sessionid, $offset) {
$fulldate = date("m/d/Y H:i:s",time() + $offset);
$stmnt = "INSERT INTO SESSION (SES_ID, SES_EXPIRE) " .
"VALUES(" . $sessionid . "," .
"'" . $fulldate . "')";
//echo('Query: ' . $stmnt . '<br>');
$sthdl = ibase_query($stmnt,$dbh); <------ displays error regardless
if ($sthdl) ibase_commit();
else print("Error: " . ibase_errmsg() . "<br>");
return $sthdl;
};
--