PDO_SQLSRV is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MS SQL Server (starting with SQL Server 2005) and SQL Azure databases.
The PDO_SQLSRV extension is enabled by adding appropriate DLL file to your PHP extension directory and the corresponding entry to the php.ini file. The PDO_SQLSRV download comes with 8 driver files, four of which are for PDO support.
The most recent version of the driver is available for download here: ? SQLSRV download. The driver sources are hosted in a ? public repository.
For more information about system requirements, see ? SQLSRV System Requirements.
The PDO_SQLSRV extension is only compatible with PHP running on Windows. For Linux, see ODBC and .
下列常量由此驅(qū)動定義,且僅在擴(kuò)展編譯入 PHP
或在運行時動態(tài)載入時可用。另外,使用此驅(qū)動時,僅會使用這些驅(qū)動特定的常量。使用其他驅(qū)動的驅(qū)動特定的常量可能會導(dǎo)致不可預(yù)見的情況。如果代碼可運行于多個驅(qū)動,PDO::getAttribute()
可被用于獲取
PDO_ATTR_DRIVER_NAME
屬性以檢查驅(qū)動。
PDO::SQLSRV_TXN_READ_UNCOMMITTED
(int)
PDO::SQLSRV_TXN_READ_COMMITTED
(int)
PDO::SQLSRV_TXN_REPEATABLE_READ
(int)
PDO::SQLSRV_TXN_SNAPSHOT
(int)
PDO::SQLSRV_TXN_SERIALIZABLE
(int)
PDO::SQLSRV_ENCODING_BINARY
(int)
PDO::SQLSRV_ENCODING_SYSTEM
(int)
PDO::SQLSRV_ENCODING_UTF8
(int)
PDO::SQLSRV_ENCODING_DEFAULT
(int)
PDO::SQLSRV_ATTR_QUERY_TIMEOUT
(int)
PDO::SQLSRV_ATTR_DIRECT_QUERY
(int)