adds possibility to use sqlite as a db
This commit is contained in:
parent
91307d4a36
commit
8de9fd3027
4 changed files with 34 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue