note 100188 deleted from book.mssql by danbrown

From: Date: Wed, 06 Oct 2010 14:46:45 +0000
Subject: note 100188 deleted from book.mssql by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173015@lists.php.net to get a copy of this message
Note Submitter: jezza at 9000internets dot com ---- 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.

« previous php.notes (#173015) next »