Link to home
Start Free TrialLog in
Avatar of Jeff
JeffFlag for United States of America

asked on

What is the PDO equivalent to sqlsrv_query and sqlsrv_fetch_array?

I'm new to PHP and I need to convert two lines of code from sqlsrv to pdo but I do not know the commands or syntax. The code is as follows:

$result = sqlsrv_query($conn,$checkTable);
$data = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC);

Open in new window


What is the PDO equivalent?
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeff

ASKER

Worked perfectly. Thank you Chris.