php - SQLSRV doesn't fetch all rows -
i'm using sqlsrv extension php , have problem fetching rows simple query. query select should return 133228 rows when trying display rows 15. i've searched answer couldn't find solution , first time using extension. i've found answer previous question same problem in case problem double calling of sqlsrv_fetch_array, don't have sure.
here query:
$sql = 'select * viewproduct'; $params = array(); $options = array('scrollable' => sqlsrv_cursor_keyset); $stmt = sqlsrv_query($dbremote, $sql, $params, $options); $count = sqlsrv_num_rows($stmt); if ($count === false) echo "error in retrieveing row count."; else echo $count; //$rows = array(); while ($row = sqlsrv_fetch_array($stmt, sqlsrv_fetch_assoc)) { print_r($row); echo "<br>"; //$rows[] = $row; }
as said above query returns 15 when should 133228 rows.
what missing? thank in advance.
Comments
Post a Comment