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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC