HOW TO change database driver to MySQLi or PDO drivers?

Talk and info about common issues

Moderators: ne_moj, zewa

administrator
Site Admin
Site Admin
Posts: 5922
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO change database driver to MySQLi or PDO drivers?

Postby administrator » Mar 18th, '14, 12:49

In the last versions that supports PDO and MySQLi there is a simple way to change database type (driver).
It's very easy to check if your version of the script supports PDO. To do this simply open include/ directory.
If you see there files called: functions.database.pdo.inc.php and functions.database.mysqli.inc.php
it means your version supports PDO and MySQLi.

Now, open file include/settings.inc.php and find there following command:

Code: Select all

define('DB_TYPE', 'MySQL');


Change it according to your needs:

Code: Select all

define('DB_TYPE', 'PDO');
// or
define('DB_TYPE', 'MySQLi');


That's all you may refresh your site to check how it works!

Return to “ApPHP MicroCMS {HOW TO}”