Ejemplo n.º 1
0
 public function initTables()
 {
     $db = Lib::db();
     foreach (glob(Config::getBasePath() . '/schemas/*.sql') as $file) {
         $sql = file_get_contents($file);
         $db->query($sql);
     }
     echo 'Completed';
     exit;
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     if (empty(self::$db)) {
         self::$db = Lib::db();
     }
 }
Ejemplo n.º 3
0
 public function __construct()
 {
     $this->db = Lib::db($this->activedb);
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     $this->db = Lib::db($this->activedb);
     $this->{$this->primarykey} = null;
 }