php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4305 OCIFetchInto adds spaces to strings
Submitted: 2000-05-03 14:08 UTC Modified: 2006-07-17 08:08 UTC
From: edink at proventum dot net Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.0 Release Candidate 1 OS: Linux 2.2 (RH 6.1)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 + 45 = ?
Subscribe to this entry?

 
 [2000-05-03 14:08 UTC] edink at proventum dot net
OCIFetchInto always returns strings as big as char field in the database. I have a char field which size is 30 and if I use OCIFetchInto I always get PHP strings of that exact size. If the DB field is not full I get strings padded with spaces.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-03 21:05 UTC] thies at cvs dot php dot net
columns of type CHAR oracle ade filled up to their defined length with spaces by oracle.

i'll put on my todo to have a *flag*  to  trim them of on retrival.

no bug here - use VARCHAR instead of CHAR if you don't like the padding.

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Jan 24 14:03:33 2022 UTC