* This class provides access to the internal database system. Use this class exlusively if you want to access databases
*/
class DB {
-
-
/**
* @brief Prepare a SQL query
* @param $query Query string
return(\OC_DB::prepare($query,$limit,$offset));
}
-
/**
* @brief gets last value of autoincrement
* @param $table string The optional table name (will replace *PREFIX*) and add sequence suffix
return(\OC_DB::insertid($table));
}
-
/**
* @brief Start a transaction
*/
return(\OC_DB::beginTransaction());
}
-
/**
* @brief Commit the database changes done during a transaction that is in progress
*/
return(\OC_DB::commit());
}
-
/**
* @brief check if a result is an error, works with MDB2 and PDOException
* @param mixed $result
public static function isError($result) {
return(\OC_DB::isError($result));
}
-
-
-
}