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
Post a Comment