php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31283 30 character column name limit
Submitted: 2004-12-24 11:26 UTC Modified: 2004-12-24 12:08 UTC
From: james at brendata dot co dot uk Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 5.0.1 OS: Windows NT4
Private report: No CVE-ID: None
 [2004-12-24 11:26 UTC] james at brendata dot co dot uk
Description:
------------
Only a limit of 30 characters on a column name, regardless of how long the column name is. We are using the column names as a way of passing data.

Reproduce code:
---------------
<?php

$msconnect=mssql_connect("hostname","username","password");
mssql_select_db("any db",$msconnect);

$sql = <<<EOT
	
	select 1 as a23456789012345678901234567890123456789 from syscolumns
	
EOT;
	
$msresults=mssql_query($sql);
$row = mssql_fetch_array($msresults, MSSQL_ASSOC);
print_r($row);
?>

Expected result:
----------------
Array ( [a23456789012345678901234567890123456789] => 1 ) 

Actual result:
--------------
Array ( [a23456789012345678901234567890] => 1 ) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-24 11:44 UTC] james at brendata dot co dot uk
We have just found this in 23990, it is a DBLIB issue with Microsoft.
 [2004-12-24 12:08 UTC] derick@php.net
Marking as "bogus" as it's both a duplicate and not a bug in PHP.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Oct 06 14:03:44 2022 UTC