Example #1
0
 public static function attachDatabase($dbFile)
 {
     if (self::$attached) {
         R::exec('DETACH DATABASE userdb');
     }
     $path = Config::$dbPath . DIRECTORY_SEPARATOR . $dbFile;
     R::exec('ATTACH DATABASE ? AS userdb', [$path]);
     self::$attached = true;
 }