开发者

Does CakePHP officially support SQLite3?

If so, how well? I can't seem to find any u开发者_如何学JAVAp to date information.


http://book.cakephp.org/view/1075/DataSources

DataSources are the link between models and the source of data that models represent. In many cases, the data is retrieved from a relational database such as MySQL, PostgreSQL or MSSQL. CakePHP is distributed with several database-specific datasources (see the dbo_* class files in cake/libs/model/datasources/dbo/), a summary of which is listed here for your convenience:

  • dbo_mssql.php
  • dbo_mysql.php
  • dbo_mysqli.php
  • dbo_oracle.php
  • dbo_postgres.php
  • dbo_sqlite.php

EDIT:

http://book.cakephp.org/view/922/Database-Configuration

Table below code listing.

driver row

The name of the database driver this configuration array is for. Examples: mysql, postgres, sqlite, pear-drivername, adodb-drivername, mssql, oracle, or odbc. Note that for non-database sources (e.g. LDAP, Twitter), leave this blank and use "datasource".

Have you just tried ti set the driver ?

var $default = array(
                 'driver'      => 'sqlite',
                 'persistent'  => false,
                 'host'        => 'localhost',
                 'login'       => 'login',
                 'password'    => 'password',
                 'database'    => 'full_path_to_sqlite_file',
                 'prefix'      => ''
);


This might a duplicate of How do I connect CakePHP to a SQLite database? Also have a look here for more information Using Sqlite3 with CakePHP


Digging through the CakePHP tickets it seems the developers won't add Sqlite3 support officially, but encourage the use of this plugin.

https://github.com/cakephp/datasources

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜