Using other databases e.g. SQLite

Asked by u0206397

In the CoughPHP handbook at, one of the requirements/dependencies is the use of MySQL. It mentions the following,

"MySQL (It should be possible to hook up other database drivers, but out of the box only MySQL support is included."

However, I'm thinking of testing it out with SQLite. Is hooking up other database drivers simply a matter of fiddling with the Connection String supplied? Is CoughPHP using PDO underneath or it is hardcoded to use mysql_xxx functions internally?

Question information

English Edit question
CoughPHP Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anthony Bush (awbush) said :

CoughPHP 1.4 (bzr checkout lp:coughphp/1.4 coughphp-1.4) has both mysql and mssql drivers in it. Someone's even made a PostgreSQL driver.

It should be easy to follow their lead to make other drivers, e.g. using PHP's sqlite_xxx functions. That said, CoughPHP is organized in a way that allows any driver to be used (PDO, MDB2, the provided ones, etc.): they only need wrapper classes to be written, e.g. As_PdoDatabase, As_PdoDatabaseResult.

See the "mssql" and "mysql" folders inside the "as_database2" folder:

Can you help with this problem?

Provide an answer of your own, or ask u0206397 for more information if necessary.

To post a message you must log in.