I wondered what database is available in FuelPHP, and look into FuelPHP code.
Environment
FuelPHP 1.8 (GitHub)
Available Database
The following DBMS is theoretically available in FuelPHP. It means that FuelPHP use driver for the following databases.
Cubrid
FreeTDS
Microsoft SQL Server
Sybase
Firebird
IBM DB2
IBM Informix Dynamic Server
MySQL
Oracle Call Interface
ODBC v3 (IBM DB2, unixODBC and win32 ODBC)
PostgreSQL
SQLite 3, 2
SQL Azure
4D
How to investigate
First, read manual. At the section Database Introduction, it says Can be mysql, mysqli or pdo. Namely, FuelPHP can handle mysql specific driver and PDO driver.
Then, read PDO section of PHP document. For above all DBMS, PDO is available.
Well, can FuelPHP handle PDO and connect to DB in real? Now, look at the FuelPHP core code, which handle database connection. There are 3 kind of connection.php, each of them handle mysql, mysqli, PDO connection. It’ll be clear PDO is available in FuelPHP.
Take your Attention when you use sqlite
You should be careful when you use sqlite. (FuelPHP version 1.7.2)
Primary Key
Migration doesn’t work when you add Primary Key like MySQL. In sqlite3, we can’t add name to Primary Key. 例えば MySQL なら Primary Key id (id) となるところが、 sqlite3 だと Primary Key (id) というようになります。
So, we should create plain SQL or change FuelPHP core code. It’s a choice not to use Primary Key, but I don’t recommend.
If you don’t set charset in db config (config/db.php), php oil migrate occurs an error of SQL, CREATE TABLE, because SQL which contains DEFAULT CHARACTER SET utf8 at last is executed. To prevent that, set empty string to charset, charset => ''. すると、 DEFAULT から始まる文字コード指定部分がなくなり、 sqlite3 でも php oil migrate が動くようになります。