ID:               23990
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at electricsurfer dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Win XP PRO
 PHP Version:      4.3.2
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Functions returning a column name are based on the dbcolname() function
in DBLIB. DBLIB from microsoft was developed for SQL Server 6.x where
the max identifier length was 30

#define SQL_MAX_COLUMN_NAME_LEN             30

This is only a problem on Win32 where we use DBLIB from Microsoft. On
platforms where we use FreeTDS this is not a problem.


Previous Comments:
------------------------------------------------------------------------

[2003-06-03 16:42:24] php at electricsurfer dot com

Just found bug #20810 which coincides with this one.

mssql_fetch_field() also has the same problem.

------------------------------------------------------------------------

[2003-06-03 12:16:49] php at electricsurfer dot com

mssql_field_name() has same problem

------------------------------------------------------------------------

[2003-06-03 11:41:35] php at electricsurfer dot com

with mssql_fetch_assoc or mssql_fetch_array.

NOT mssql_fetch_row.

------------------------------------------------------------------------

[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

Reply via email to