Subject | Re: [firebird-php] Trapping errors |
---|---|
Author | Milan Babuskov |
Post date | 2006-07-25T07:57:12Z |
myles@... wrote:
anything to fetch?
error_reporting(0);
As for the error handling, I use something like this:
$result = ibase_query("insert into ... values ...");
if (!$result)
echo "ERROR: ".ibase_errmsg();
As you can see, you can check if statement is executed successfully by
checking the return value of ibase_query. And ibase_errmsg() returns
textual error message related to last statement that was executed.
--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org
> However if Firebird returns an error related to, for example, a violation ofViolation of Unique happens only on INSERT and UPDATE, so there isn't
> a unique index constraint on a column on a table, my PHP code doesn't
> receive it until it gets to Fetch any data back from a query.
anything to fetch?
> And when it does get these errors returned, they are returned as general PHPI've set those to OFF:
> errors with the Firebird error message embedded in the 'Warning' area of the
> PHP error.
error_reporting(0);
As for the error handling, I use something like this:
$result = ibase_query("insert into ... values ...");
if (!$result)
echo "ERROR: ".ibase_errmsg();
As you can see, you can check if statement is executed successfully by
checking the return value of ibase_query. And ibase_errmsg() returns
textual error message related to last statement that was executed.
--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org