#30644 [Opn->Bgs]: same strlen of mssql filed value
| From: | derick@php.net | Date: | Mon, 01 Nov 2004 07:20:04 +0000 |
| Subject: | #30644 [Opn->Bgs]: same strlen of mssql filed value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68568@lists.php.net to get a copy of this message | ||
ID: 30644
Updated by: derick@php.net
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