note 9930 added to ibase_execute
| From: | anthony at n dot o dot s dot p dot a dot m dot trams dot com | Date: | Sat, 02 Dec 2000 10:55:05 +0000 |
| Subject: | note 9930 added to ibase_execute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8341@lists.php.net to get a copy of this message | ||
Here's a way to SELECT with prepare/execute, thereby avoiding the need to use magic quotes or
such kludges.
$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 ) {
$taxForm[$val] = ibase_execute ( $prep, $val, $dept_cd ) ;
}
http://www.php.net/manual/function.ibase-execute.php