How to loop through result set objects using mssql_fetch_array()?
Answer / Shweta Paedey
In PHP, you can't use mssql_fetch_array() with SQL Server. Instead, you should use the PDO_SQLSRV extension or the SQLSRV functions. Here's an example of how to loop through a result set using sqlsrv_fetch_array():nn```phpn$stmt = sqlsrv_query($conn, $sql);nwhile ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {n // Do something with the row here.n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the steps you will take to improve the performance of a poor performing query?
what is spatial nonclustered index
What is INTVAL( )and where we use Plz any body help me
What is the difference between functions and stored procedures?
How to provide values to stored procedure parameters in ms sql server?
What is an inner join?
What is the advantage of sql server?
how to get the automatic backup of the database in the sql server
What is log in sql server?
What is the use of keyword with encryption. Create a store procedure with encryption?
how will add additional conditions in sql?
1 Answers Amdocs, Apps Associates,
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)