Subject Re: [firebird-php] Processing Firebird errors in PHP
Author Thomas Beckmann
Hi Todd,

I use my own DB-layer, that contains a property holding the current error
state. Do you just want to know, how we are doing it, or do you have
precise problem? Your code does not show errors on logical problems (like
division by zero) yet, because these occur on fetch time...

Todd Cary schrieb:
> I would appreciate some suggestions on how errors should be processed in
> Apache/PHP. Here is a snippet of my current code:
> ...
> $sthdl = ibase_query($stmnt,$dbh);
> if ($sthdl) ibase_commit();
> if (ibase_errmsg()) {
> echo('Query: ' . $stmnt . '<br>');
> echo ibase_errmsg();
> exit;
> }
> return $sthdl;
> where $stmnt is the query statement. If I do not put the "exit" in the
> code, the function will run giving erroneous results. I would like to
> display an error page informing the surfer to contact the DBA.

Martens & Prahl EDV, Wielandstr. 14c, 23558 Lübeck
Telefon 0451-39904-525 • Telefax -520/-559