#23990 [Opn]: mssql_fetch_assoc does not support long column names

From: Date: Tue, 03 Jun 2003 16:41:35 +0000
Subject: #23990 [Opn]: mssql_fetch_assoc does not support long column names
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-41041@lists.php.net to get a copy of this message
ID: 23990 User updated by: php at electricsurfer dot com Reported By: php at electricsurfer dot com Status: Open Bug Type: MSSQL related Operating System: Win XP PRO PHP Version: 4.3.2 New Comment: with mssql_fetch_assoc or mssql_fetch_array. NOT mssql_fetch_row. Previous Comments: ------------------------------------------------------------------------ [2003-06-03 11:29:50] php at electricsurfer dot com If you select a field with a column name that has more than 30 chars. Using mssql_fetch_assoc or mssql_fetch_row to fetch it will only return a key with the 1st 30 chars. ( Mysql functions work with longer column names ) <? // connect to db Here $result = mssql_query('select MyVeryVeryVeryVeryVeryVeryLongColumnName from table'); $row = mssql_fetch_assoc($result); // $row = array('MyVeryVeryVeryVeryVeryVeryLong'=>50) (only first 30 chars in key) ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23990&edit=1

« previous php.bugs (#41041) next »