Hi David,

Am Fr 9.Dezember 2005 11:00 schrieb David Skyers:
> Is there a standard for inserting data into Oracle tables from a user input
> field in PHP?
> Most Oracle tables will have a limit on the amount characters such as
> Name VARCHAR2(60 BYTE) - this means the maximum amount of characters
> allowed is 60.
> If you use special characters in PHP such as entering the following into a
> input box
> ¬!"£$%^&*()[EMAIL PROTECTED]<>?|\,./;'#][=-¦abcdefghijklmnopqrstuvwxyzA
> When this gets passed to Oracle it takes the overall characters in the
> insert statement to 64, which then fails because it is over the Oracle
> table limit. Is there a standard way of dealing with something like this.

your problem description sounds to me as you use a character encoding that 
uses for 4 of your test chars a 2byte code and for the other chars a 1 byte 
I don't know a standard way, i think you can look into your encoding table 
that you use into your oracle db (nls_language parameter) and count the bytes 
in a selfmade procedure before you sent to oracle ...

afair if you use a utf8 or similiar international encoding the newer versions 
of oracle count a charachter as 1 element in your VARCHAR2 definition and not 
as bytes.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to