I am using PHP 5.3.6 on Windows and connecting to a SQL Server 2008 database.
According to the docs at MSDN there are two drivers for me to choose from.
php_sqlsrv_53_nts_vc9.dll
php_pdo_sqlsrv_53_nts_vc9.dll
The documentation on how to use each is great, but I'm not sure why I would use one over the other.
Can someone provide some insight on what the fundamental differences are (other than syntax) and why one is better than the other?
The bonus to using PDO is that if your hosting environment changes to Linux or SQL Server is not available then there is very little that you will need to change. The connection string, where you specify what sort of database (SQL Server, MySQL, SQLite etc) would be the main if not the only change needed. (apart from how you format your queries)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With