SQL
Content:
Notes
Provides SQL access functions. It is part of a universal DB API used by AMX Mod X, so it exports the same functions as any other AMX Mod X database driver, but interfaces with SQL. The SQL API is maintained by BAILOPAN.
- dbi.inc (Provides a universal databasing layer.)
DBI only has a few constants:
"Sql Constants:
enum Sql
{
SQL_FAILED=0,
SQL_OK
}
"Return Constants:
enum Result
{
RESULT_FAILED=-1,
RESULT_NONE,
RESULT_OK
}
Functions
dbi_close - Closes a database connection handle.
dbi_connect - Connects to a mysql database.
dbi_error - Returns an error message set on an SQL connection handle.
dbi_field - Returns a field from an SQL result row.
dbi_free_result - Frees the memory used by a result handle.
dbi_nextrow - Advances the row pointer for an SQL result handle.
dbi_num_rows - Returns the number of rows returned from a query.
dbi_query - Executes a query on an SQL resource handle.
dbi_result - Gets a field result by name instead of number.
dbi_type - Gets the type of database being used.