| 1234567891011121314151617181920212223242526 |
- <?php
- /**
- * Creates a database connection using the data in the config files.
- *
- * @return SQLite3Result Connection to the database.
- */
- function start_db(){
- global $path;
- //return new SQLiteDatabase($path["db"]);
- class SQLite extends SQLite3 {
- function __construct($file) {
- $this->open($file);
- }
- }
- $db = new SQLite3($path["db"]);
- if(!$db) {
- error_log($db->lastErrorMsg());
- }
- else {
- return $db;
- }
- }
- ?>
|