Esempio n. 1
0
 private static function getTableSyntax($tableName)
 {
     if (DB::driver() == DB::SQLITE) {
         return DB::oneValue(DB::DEF, "SELECT sql FROM sqlite_master where type='table' and tbl_name='{$tableName}'");
     } else {
         $createTable = new DBTable(DB::DEF, 'SHOW CREATE TABLE ' . $tableName);
         return $createTable->getValue(1, 0);
     }
 }