note 100188 added to book.mssql
| From: | jezza at 9000internets dot com | Date: | Thu, 30 Sep 2010 02:19:54 +0000 |
| Subject: | note 100188 added to book.mssql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172831@lists.php.net to get a copy of this message | ||
Using the new MS driver I have come across a difference between the array that I get back compared
to mssql.
Example is here (both return types are associative arrays:
sqlsrv_fetch_array($resource, SQLSRV_FETCH_ASSOC)
"same as" sqlsrv_fetch($resource), as this returns by default an associative array, by
default sqlsrv_fetch_array returns both an associative and a numeric array.
returns...
array(6) { ["yaxis"]=> object(DateTime)#58 (3) { ["date"]=> string(19)
"2010-09-29 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=>
string(19) "Australia/Melbourne" } ["xaxis"]=> string(7) "Inbound"
["tt"]=> int(280345) ["ht"]=> int(297219) ["wt"]=> int(16874)
["calls"]=> int(1539) } string(8) ""
mssql_fetch_assoc($resource)
returns
array(6) { ["yaxis"]=> string(19) "2010-09-29 00:00:00"
["xaxis"]=> string(7) "Inbound" ["tt"]=> int(280345)
["ht"]=> int(297219) ["wt"]=> int(16874) ["calls"]=>
int(1539) } string(8) ""
it would be much too difficult to change a large number of applications to compensate for this. Has
anyone had experience with this issue and have a work around?
I cannot see any thing else in the API that will work around this issue.
----
Server IP: 69.147.83.197
Probable Submitter: 218.185.10.126
----
Manual Page -- http://www.php.net/manual/en/book.mssql.php
Edit -- https://master.php.net/note/edit/100188
Del: integrated -- https://master.php.net/note/delete/100188/integrated
Del: useless -- https://master.php.net/note/delete/100188/useless
Del: bad code -- https://master.php.net/note/delete/100188/bad+code
Del: spam -- https://master.php.net/note/delete/100188/spam
Del: non-english -- https://master.php.net/note/delete/100188/non-english
Del: in docs -- https://master.php.net/note/delete/100188/in+docs
Del: other reasons-- https://master.php.net/note/delete/100188
Reject -- https://master.php.net/note/reject/100188
Search -- https://master.php.net/manage/user-notes.php