Link to home
Start Free TrialLog in
Avatar of Marthaj
MarthajFlag for United States of America

asked on

PHP 7.4 and using PDO instead of sqlsrv

I am converting a program from PHP 5.6 to use PHP 7.4. And I am confused about  PDO.
I thought in using PHP 7.4, I would need to change all of my SQL statements to use PDO syntax.
But I am finding out, that doesn't seem to be the case. I understand PDO is probably the better
approach of the two.
Could someone be as so kind to clarify for me ??
Thank you in advance.

Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You need the SQLSRV driver to get the PDO version.  All PDO drivers require a database specific driver to go with the main PDO extension.  extension=php_sqlsrv.dll and/or extension=php_pdo_sqlsrv.dll
https://github.com/microsoft/msphpsql
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 Marthaj

ASKER

Thank you both for responding.  Clears the air for me ! They have always used MS SQL Server and I can not at this point, see them changing it. Upgrading - yes .....changing to another Database type - nope...but now you watch...after writing this I may end up with egg on my face .LOL.