/** * Checks if a table given table exists in the db * * @param mixed $table Table name * @return boolean Returns true if $table exists. */ static function table_exists($table) { if (!self::$tableList) { self::$tableList = DB::tableList(); } return isset(self::$tableList[strtolower($table)]); }