略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: PDO 驱动

2024-04-28

PDO 驱动

目录

下列驱动目前实现了 PDO 接口:

驱动名称 支持的数据库
PDO_CUBRID Cubrid
PDO_DBLIB FreeTDS / Microsoft SQL Server / Sybase
PDO_FIREBIRD Firebird
PDO_IBM IBM DB2
PDO_INFORMIX IBM Informix Dynamic Server
PDO_MYSQL MySQL 3.x/4.x/5.x
PDO_OCI Oracle Call Interface
PDO_ODBC ODBC v3 (IBM DB2, unixODBC and win32 ODBC)
PDO_PGSQL PostgreSQL
PDO_SQLITE SQLite 3 及 SQLite 2
PDO_SQLSRV Microsoft SQL Server / SQL Azure
add a noteadd a note

User Contributed Notes 3 notes

up
4
fleduc dot perso at gmail dot com
4 years ago
Watch out!

If you use PDO SQLSRV on windows 7, using 32 bit php on XAMMP, you might encounter driver problems : "This extension requires the Microsoft ODBC Driver 11 for SQL Server to communicate with SQL Server"

The reason, Microsoft 32-bit ODBC driver doesn't install properly on 64-bit Windows 7.

Check the solution to PDO SQLSRV driver problem here in [StackOverflow][1]

https://stackoverflow.com/a/46245990/1330248
up
-1
Sbastien
17 days ago
To get the available drivers on your system, you can do :

<?php

print_r
(PDO::getAvailableDrivers());
up
-28
frankjustme2004 at yahoo dot com
6 years ago
For those seeking Netezza access you can use php_odbc or pdo_odbc. They both work flawlessly. Found some issues between Web vs CLI that were around LD_LIBRARY_PATH setting in Unix. As long as this is set in Unix and Apache environment it will work.

官方地址:https://www.php.net/manual/en/pdo.drivers.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3