diff options
author | Aaron Parecki <aaron@parecki.com> | 2015-07-25 03:42:47 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2015-07-25 03:42:47 -0700 |
commit | 41fac1f6f109912defa07d7acb6b95e015ad4339 (patch) | |
tree | daeb304c6a427836166c4ccb65cb247add0b3de0 /lib/helpers.php | |
parent | 0c27b5bdd561aa27e1138f4fdc2be04bd828ff69 (diff) | |
parent | 8de9fd30276a273e715c0f3ee4cf227d2927bb36 (diff) |
Merge pull request #20 from jeena/sqlite
Adds possibility to use SQLite as db
Diffstat (limited to 'lib/helpers.php')
-rw-r--r-- | lib/helpers.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/helpers.php b/lib/helpers.php index 4f6b4c1..e7e7771 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -1,8 +1,12 @@ <?php -ORM::configure('mysql:host=' . Config::$dbHost . ';dbname=' . Config::$dbName); -ORM::configure('username', Config::$dbUsername); -ORM::configure('password', Config::$dbPassword); +if(Config::$dbType == 'sqlite') { + ORM::configure('sqlite:' . Config::$dbFilePath); +} else { + ORM::configure('mysql:host=' . Config::$dbHost . ';dbname=' . Config::$dbName); + ORM::configure('username', Config::$dbUsername); + ORM::configure('password', Config::$dbPassword); +} function render($page, $data) { global $app; |