note 28811 added to function.ibase-execute
| From: | caveman at rack1 dot php dot net | Date: | Fri, 24 Jan 2003 16:18:18 +0000 |
| Subject: | note 28811 added to function.ibase-execute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42696@lists.php.net to get a copy of this message | ||
ibase_execute only return resource id not the actual result, you need to use ibase_fetch_row or
ibase_fetch_object to retrieve actual result.
On the example above given by anthony
it should be like these
$dbh = ibase_connect ( $host, $username, $password ) ;
$stmt = 'SELECT * FROM "EMPLOYEE" WHERE "SALARY" = ? AND
"DEPT_CD" = ? ;' ;
$prep = ibase_prepare ( $dbh, $stmt ) ;
$salary = Array ( "10000", "25000", "33000", "48000" ) ;
$dept_cd = 'SALES' ;
foreach ( $salary as $val ) {
$res = ibase_execute ($prep, $val, $dept_cd);
$taxForm[$val] = ibase_fetch_row ($res);
}
--
http://www.php.net/manual/en/function.ibase-execute.php
http://master.php.net/manage/user-notes.php?action=edit+28811
http://master.php.net/manage/user-notes.php?action=delete+28811
http://master.php.net/manage/user-notes.php?action=reject+28811