note 110964 added to function.sqlsrv-num-rows

From: Date: Sun, 30 Dec 2012 09:50:18 +0000
Subject: note 110964 added to function.sqlsrv-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-192709@lists.php.net to get a copy of this message
Note that when migrating your MS SQL Server PHP Driver from MSSQL to SQLSRV, if you have used mssql_num_rows, replacing them with sqlsrv_num_rows and replacing mssql_query($query, $mssql_link) with sqlsrv_query($sqlsrv_link, $query) calls will make your sqlsrv_num_rows calls fail. In order to avoid that, you should specify either static, keyset or buffered cursors (buffered cursor has been available since SQLSRV 3.0) when calling sqlsrv_query. For example, <?php mssql_query($query, $mssql_link); // is equivalent to sqlsrv_query($sqlsrv_link, $query, array(), array('Scrollable' => 'buffered')); ?> Using the buffered cursor is "more equivalent" than using the static or keyset cursors to simple mssql_query calls, since it caches the entire result set in client memory. ---- Server IP: 69.147.83.199 Probable Submitter: 78.111.12.1 ---- Manual Page -- http://php.net/manual/en/function.sqlsrv-num-rows.php Edit -- https://master.php.net/note/edit/110964 Del: integrated -- https://master.php.net/note/delete/110964/integrated Del: useless -- https://master.php.net/note/delete/110964/useless Del: bad code -- https://master.php.net/note/delete/110964/bad+code Del: spam -- https://master.php.net/note/delete/110964/spam Del: non-english -- https://master.php.net/note/delete/110964/non-english Del: in docs -- https://master.php.net/note/delete/110964/in+docs Del: other reasons-- https://master.php.net/note/delete/110964 Reject -- https://master.php.net/note/reject/110964 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192709) next »