且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用SQL Server驱动程序通过PDO连接到SQL Server

更新时间:2022-11-17 10:51:18

PDO***的部分是访问任何数据库都非常容易.前提是您已经安装了这些驱动程序,那么您应该能够做到:

Well that's the best part about PDOs is that it's pretty easy to access any database. Provided you have installed those drivers, you should be able to just do:

$db = new PDO("sqlsrv:Server=YouAddress;Database=YourDatabase", "Username", "Password");