Quantcast
Channel: Microsoft Drivers for PHP for SQL Server forum
Viewing all articles
Browse latest Browse all 391

Get num rows with Stored Procedures

$
0
0

PHP 5.4.9
SQL SERVER: 2008 R2
DRIVER FOR PHP FOR SQL SERVER: 3.0.1

I was using php 5.2 so I was still using the driver mssql. Now I am trying to update my system and I can not make sqlsrv_num_rows work when I query a store procedure.

Example:

$sql="prueba";
$params = array();
$options =  array( "Scrollable" => SQLSRV_CURSOR_KEYSET );
$query =  sqlsrv_query($conexion, $sql, $params, $options);
echo "-". sqlsrv_num_rows($query);

It shows -1

I can not believe there is not a way to do this being in the version 3.0.1 of the driver when mssql had it.


Viewing all articles
Browse latest Browse all 391

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>