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.

PHP

Avatar of undefined
Last Comment
Marthaj
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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Marthaj
Marthaj
Flag of United States of America image

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.
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo