note 39302 added to function.mssql-fetch-array

From: Date: Fri, 23 Jan 2004 20:11:32 +0000
Subject: note 39302 added to function.mssql-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-64079@lists.php.net to get a copy of this message
from php-dev mailing list article - #26012 [Bgs]: mssql_fetch_array "Previously mssql data was always rtrimed, however that's wrong because it modifies the original data. This caused a problem for people who needed those trailing space. Ultimately, the job of database extension is to fetch the data as is (like other db extensions already do) and not to mangle it in any way." moving from <4.3.4 to a higher version you will have this now: $query = "Select dumb_spaces from dbo.table where weak_sause = 'true'"; $result = mssql_query($query) or die("Spicy Sause! Query = $query"); while($line = mssql_fetch_array($result, MSSQL_ASSOC) { foreach($line as $bs_trim) { //Trim whitespace from end of query $bs_trim = rtrim($bs_trim); echo "Clean!".$bs_trim; } } ---- Manual Page -- http://www.php.net/manual/en/function.mssql-fetch-array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39302 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39302&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39302&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64079) next »