OCI8 for PHP (Oracle Connection) values come with spaces (completed to full lenght) -


i using oci8 php connecting oracle 11g database.

everything working fine, imported values oracle database come spaces, completed full lenght.

for example, value on db nchar(10 char)

'value' 

oci8 returns

'value     '  

with 5 spaces, 10 chars total.

any ideas or recommendations?

yes, *char types in oracle have spaces appended way end, not php-specific. use rtrim() if don't want them:

select rtrim(field_name) field_name ... 

... or php's own rtrim() of course.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -