oci8

Dealing with eacute and other special characters using Oracle, PHP and Oci8

橙三吉。 提交于 2019-12-04 07:17:06
Hi I am trying to store names into an Oracle database and fetch them back using PHP and oci8. However, if I insert the é directly into the Oracle database and use oci8 to fetch it back I just receive an e Do I have to encode all special characters (including é ) into html entities (ie: é ) before inserting into database ... or am I missing something ? Thx UPDATE: Mar 1 at 18:40 found this function: http://www.php.net/manual/en/function.utf8-decode.php#85034 function charset_decode_utf_8($string) { if(@!ereg("[\200-\237]",$string) && @!ereg("[\241-\377]",$string)) { return $string; } $string =

CHAR semantics and ORA-01461

旧城冷巷雨未停 提交于 2019-12-03 07:10:55
I maintain a PHP driven application with Oracle backend (OCI8 functions). The app is developed with Oracle 10g XE and deployed on whatever version the customer owns. The application handles single-byte text (ISO-8859-15) and I've never had any problem while developing against the Western European edition of Oracle XE. However, I've recently installed the Universal edition and I'm having issues when inserting large strings with non-ASCII chars. This version sets NLS_CHARACTERSET = AL32UTF8 ; since I my app uses WE8ISO8859P15 Oracle silently converts my input data from ISO-8859-15 to UTF-8

Why is PHP's OCI8/Oracle oci_bind_array_by_name not working for me?

巧了我就是萌 提交于 2019-12-02 21:38:56
问题 I'm trying to bind a php variable to pl/sql array. The pl/sql procedure works fine when I execute it manually and set the bind, so I know that's not the problem. It's the oci_bind_array_by_name that is causing problems. I get the following error message for the line in the PHP code below where I call the oci_bind_array_by_name function: Warning: oci_bind_array_by_name() [function.oci-bind-array-by-name]: You must provide max length value for empty arrays I'm confused because I am in fact

How do I require a specific version of a ruby gem?

一世执手 提交于 2019-12-02 15:47:30
Specifically, the ruby-oci8 gem. I have both 1.0.7 and 2.0.4 installed. I want 1.0.7. I can just require oci8, but I don't get the version I want. irb(main):001:0> require 'oci8' => true irb(main):002:0> OCI8::VERSION => "2.0.4" I can require using the full path to the file, which works, but is not going to be portable: irb(main):001:0> require 'C:\Ruby\lib\ruby\gems\1.8\gems\ruby-oci8-1.0.7-x86-mswin32-60\lib\oci8' => true irb(main):002:0> OCI8::VERSION => "1.0.7" I can use the gem command to ask for the version I want, but it doesn't appear to actually load the library: irb(main):001:0> gem

Installing oci8 extension in linux for php?

淺唱寂寞╮ 提交于 2019-12-02 14:12:38
I don't have a oracle database installed in my system. But i want to connect to the remote system. Do i just need to install oci8 extension library or i need to install both instantclient and the oci8 extension? If I remember correctly, OCI8 extension wouldn't even compile without Instant Client; if you install using PECL , it asks you for Instant Client path. Moreover, from my experience, you'll also need Instant Client SDK in addition to Basic, unpack them to one directory, and make some symlinks before running PECL command: sudo ln -s libclntsh.so.* libclntsh.so sudo ln -s libocci.so.*

How to sort by numbers first with Oracle SQL query?

左心房为你撑大大i 提交于 2019-11-29 04:32:50
I have this table with a 'title' field which is varchar2 and I want to select all rows and sort them first by number and then by the alphabet as it normally happens. For instance, I currently get this using a simple ORDER BY title in the end: Abc Def 321 But I want this: 321 Abc Def The weird thing is that SQL Developer shows the "right" order, with numbers first. But on my app (PHP using OCI8) it shows numbers last. Not an Oracle expert, but you are supposed to be able to do it without altering the session with SELECT * FROM my_data SORT by NLSSORT(title,’NLS_SORT=BINARY_AI’) where you can

How to sort by numbers first with Oracle SQL query?

旧街凉风 提交于 2019-11-27 18:27:11
问题 I have this table with a 'title' field which is varchar2 and I want to select all rows and sort them first by number and then by the alphabet as it normally happens. For instance, I currently get this using a simple ORDER BY title in the end: Abc Def 321 But I want this: 321 Abc Def The weird thing is that SQL Developer shows the "right" order, with numbers first. But on my app (PHP using OCI8) it shows numbers last. 回答1: Not an Oracle expert, but you are supposed to be able to do it without