how to save data for a column which has nvarchar datatype using php oracle -


i want save unicode data in column defined nvarchar in oracle database :

"आवस्यकता है ड्राइवर्स की पूर्ण विवरण के साथ संपर्क करें - यादव (8000000008)"

but when run insert query in column nvarchar type in database.

¿¿¿¿¿¿¿¿ ¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿ ¿¿¿¿¿ ¿¿¿¿¿ ¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿ - ¿¿¿¿ (8000000008)

so question -> how save data column has nvarchar datatype using php oracle?

here trying do-

putenv("oracle_home=/u01/app/oracle/product/11.2.0/db_1"); putenv("ld_library_path=//u01/app/oracle/product/11.2.0/db_1/lib:/lib:/usr/lib"); $conn = oci_connect('db1', 'ps1', '//xxx.xx.xx.xx:1521/orcl', 'al32utf8') or die('db not connected');       $stmt=oci_parse($conn,"insert tablenm (val1, val2, val3, val4, val5 )  values (:val1, :val2, :val3, :val4,  :val5 )");      $val1 = "jk";      $val2 = "10005072";      $val3 = "27-jul-17";      $val4 = 1;      $val5 = "आवस्यकता है ड्राइवर्स की पूर्ण विवरण के साथ संपर्क करें - यादव (8000000008)"; // val5 created datatype nvarchar in database        oci_bind_by_name($stmt, ':val1', $val1, 1000);        oci_bind_by_name($stmt, ':val2', $val2, 1000);        oci_bind_by_name($stmt, ':val3', $val3, 1000);        oci_bind_by_name($stmt, ':val4', $val4, 1000);        oci_bind_by_name($stmt, ':val5', $val5, 1000, sqlt_lbi);        $res =   oci_execute($stmt, oci_default);      oci_commit($conn);      echo "<pre>";      print_r($res);   

i found sqlt_lbi here, not working me.

is there chances done?

please help!

neither php oci8 or pdo_oci support nvarchar, nchar or nclob types. page 149 of http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html still valid of now:

oracle's nchar, nvarchar2, , nclob types not supported in oci8 extension

there may odd environments works (?), might db character set width big enough hold db national character set.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -