コード例 #1
0
ファイル: sqlite2.class.php プロジェクト: racontemoi/mamp
 function sqlite2($dbPath)
 {
     $this->dbVersion = 2;
     if ($dbPath == ':memory:') {
         $this->readOnly = false;
     } else {
         $this->readOnly = !is_writable($dbPath);
     }
     parent::sqlite($dbPath);
     $this->connect($dbPath);
 }
コード例 #2
0
ファイル: sqlite3.class.php プロジェクト: racontemoi/mamp
 function sqlite3($dbPath)
 {
     $this->dbVersion = 3;
     if ($dbPath == ':memory:') {
         $this->readOnly = false;
     } else {
         $this->readOnly = !is_writable($dbPath);
     }
     parent::sqlite($dbPath);
     if (class_exists('PDO') && $this->connect($dbPath)) {
         return $this->connId;
     } else {
         $this->getError();
         return false;
     }
 }