ID: 30644 Updated by: [EMAIL PROTECTED] Reported By: chenxi at shine dot com dot cn -Status: Open +Status: Bogus Bug Type: MSSQL related Operating System: LINUX RedHat9 PHP Version: 5.0.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 . Previous Comments: ------------------------------------------------------------------------ [2004-11-01 08:10:39] chenxi at shine dot com dot cn Description: ------------ Select data from mssql, and get length of the filed value by using function strlen(), but i got the same output '40', following is field info and smaple code. Reproduce code: --------------- name utName (char) 40 $dbh = @mssql_connect($tnserver_ipaddr, $tnserver_user, $tnserver_passwd); if ($dbh) { $room_num = GetRoomNum(); mssql_select_db("this"); $sql = "SELECT * FROM [dbo].[HotelFolioView] WHERE (RoomNo = '$room_num')"; $ret = mssql_query($sql); while ($row = mysql_fetch_array($ret)) { print strlen($row['name']).'\r\n'; } mssql_free_result($ret); } Expected result: ---------------- 4 7 12 8 .... different length Actual result: -------------- 40 40 40 40 .... all same '40', this is length of filed 'name' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30644&edit=1
