php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16509 mssql_fetch_array limit on fieldname-length
Submitted: 2002-04-09 05:51 UTC Modified: 2004-05-02 19:27 UTC
Votes:5
Avg. Score:4.2 ± 1.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:3 (100.0%)
From: vincent at sunlight dot tmfweb dot nl Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.1.1 OS: Win2K
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:
17 + 39 = ?
Subscribe to this entry?

 
 [2002-04-09 05:51 UTC] vincent at sunlight dot tmfweb dot nl
When getting an associative array from a MSSQL database: with mssql_fetch_array(), the keys of the array can be no longer than 30 characters.

I have a field 'last_modification_user_login_id' (31 characters) in a table 'document', but after selecting all fields from that table, I can't access that field. A var_dump however on the array shows a key 'last_modification_user_login_i', which is 30 characters. It has the right value.

This is not a problem with:
- Databases: the same code works with MySQL and PostgreSQL on the 'same' database.
- Arrays: keys can be longer than 30 characters

So it has to be a 'mssql_fetch_array' bug!

Vincent

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-06 21:07 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2004-05-02 19:24 UTC] rhittos at shaw dot ca
I am using the latest release of PHP 5.0 build 2195, release date Apr 25 2004 12:10:13.  I am also experiencing this problem.
 [2004-05-02 19:27 UTC] fmk@php.net
The MSSQL library provided by Microsoft canonly handle name, table and column names of 30 characters or less. This is not possible to fix in the php extension, and Microsoft has not updated the library since the releaseof SQL server 6.x.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 09:01:28 2024 UTC