Subject | Re: [firebird-php] Processing Firebird errors in PHP |
---|---|
Author | Todd Cary |
Post date | 2005-09-01T14:33:59Z |
Lester -
Many thanks...that is what I needed to know. I have a page,
"problem.php", that I use for other problems.
Todd
Lester Caine wrote:
Ariste Software
200 D Street Ext
Petaluma, CA 94952
(707) 773-4523
[Non-text portions of this message have been removed]
Many thanks...that is what I needed to know. I have a page,
"problem.php", that I use for other problems.
Todd
Lester Caine wrote:
>Todd Cary wrote:--
>
>
>
>>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.
>>
>>Any suggestions?
>>
>>
>
>Todd - if you know that you have an error, you just need to change the
>page that is created to tell you what the error is. In the above example
>you want to build either an error page, or a results page.
>
>if (ibase_errmsg()) {
><Display Error Message>
>} else {
><Display Results>
>}
>
>The 'exit;' is just another way of not providing the 'else' and is
>totally acceptable if not as tidy as showing the 'program flow'
>
>
>
Ariste Software
200 D Street Ext
Petaluma, CA 94952
(707) 773-4523
[Non-text portions of this message have been removed]