note 12714 modified in function.ocibindbyname by felipe
| From: | felipe@php.net | Date: | Wed, 23 Jul 2008 12:59:37 +0000 |
| Subject: | note 12714 modified in function.ocibindbyname by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142598@lists.php.net to get a copy of this message | ||
How to bind an nvarchar field:
<?php
$sql = "insert into my_table values (translate(:varname using nchar_cs))";
$stmt = OCIParse($conn, $sql);
OCIBindByName($stmt,":varname", &$value, strlen($value) + 1, 1);
$err = OCIError($stmt);
if(!$err) {
OCIExecute($stmt);
$err = OCIError($stmt);
}
OCIFreeStatement($stmt);
?>
--was--
How to bind an nvarchar field:
$sql = "insert into my_table values (translate(:varname using nchar_cs))";
$stmt = OCIParse($conn, $sql);
OCIBindByName($stmt,":varname", &$value, strlen($value) + 1, 1);
$err = OCIError($stmt);
if(!$err) {
OCIExecute($stmt);
$err = OCIError($stmt);
}
OCIFreeStatement($stmt);
http://php.net/manual/en/function.ocibindbyname.php