Skip to content
Advertisement

pdo connect convert to MSsql and fetch data

I had such code, which works fine and I need to get same result then I convert my database connection

JavaScript

And now I converting this code to:

JavaScript

How to get THE SAME RESULT AS IN MY FIRST CODE WITH PDO Connection ?

JavaScript

At first PDO example I get echo $json such data structure:

JavaScript

Advertisement

Answer

Working example:

JavaScript

Notes:

Example is tested with MS SQL Server 2012 and PHP 5.2.10.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement