Subject | Re: [firebird-php] Firebird exception handling |
---|---|
Author | Almad |
Post date | 2004-09-07T15:10:13Z |
On Tuesday 07 of September 2004 01:20, Alan McDonald wrote:
Maybe I'm stupid, but when I looked at adoDB and tried
<?php
include('adodb.inc.php'); # load code common to ADOdb
$DB =
NewADOConnection('firebird://FIDLO:73se65oi@localhost//var/www/databases/FIDLO.fdb');
# No need for Connect or PConnect when using URI syntax
$Q="SELECT USER_ID, HOTEL_ID, HOTEL_NAME, LANG_DEFAULT, \"TYPE\", IS_ADMIN,
SLOT FROM PROC_RS_GET_USER_PARAMS('almad', '".md5("blah")."')";
$result = $DB->Execute($Q);
while (!$result->EOF){
echo $result->fields[1] . " - " . $result->fields[2] . "\n";
$result->MoveNext();
}
echo $DB->ErrorMsg();
?>
I got __absolutely no__ output.
Well, when I add after last line
/* try normally*/
$d=ibase_fetch_assoc(ibase_query($Q));
?>
then I get:
Warning: ibase_fetch_assoc() [function.ibase-fetch-assoc]: exception 1
Unauthorized access! in /var/www/webroot/adodb/pokus.php on line 17
Any suggestions, please?
Thank You,
--
Lukas "Almad" Linhart
> quite a few of us here use an abstraction layer. ezSQL and adoDB bothWell, I wan't to knew _how_ do they do it ;)
> return exceptions to the calling functions. not sure if this is what you
> mean Alan
Maybe I'm stupid, but when I looked at adoDB and tried
<?php
include('adodb.inc.php'); # load code common to ADOdb
$DB =
NewADOConnection('firebird://FIDLO:73se65oi@localhost//var/www/databases/FIDLO.fdb');
# No need for Connect or PConnect when using URI syntax
$Q="SELECT USER_ID, HOTEL_ID, HOTEL_NAME, LANG_DEFAULT, \"TYPE\", IS_ADMIN,
SLOT FROM PROC_RS_GET_USER_PARAMS('almad', '".md5("blah")."')";
$result = $DB->Execute($Q);
while (!$result->EOF){
echo $result->fields[1] . " - " . $result->fields[2] . "\n";
$result->MoveNext();
}
echo $DB->ErrorMsg();
?>
I got __absolutely no__ output.
Well, when I add after last line
/* try normally*/
$d=ibase_fetch_assoc(ibase_query($Q));
?>
then I get:
Warning: ibase_fetch_assoc() [function.ibase-fetch-assoc]: exception 1
Unauthorized access! in /var/www/webroot/adodb/pokus.php on line 17
Any suggestions, please?
Thank You,
--
Lukas "Almad" Linhart