AMX Mod X API Documentation

Signature
stock SQL_SimpleQueryFmt(Handle:db, error[] = "", maxlength = 0, &rows = 0, const fmt[], any:...){ static query_buf[2048]; vformat(query_buf, 2047, fmt, 6); new Handle:hQuery = SQL_PrepareQuery(db, "%s", query_buf); if(!SQL_Execute(hQuery)) { SQL_QueryError(hQuery, error, maxlength); SQL_FreeHandle(hQuery); return 0; } rows = SQL_NumResults(hQuery); SQL_FreeHandle(hQuery); return 1;}
Description

Use this for executing a query where you don't care about the result.

Notes
  • Differs from SQL_SimpleQuery() because the query can be formated.
Parameters
  • db Connection handle returned from SQL_Connect().
  • error If an error occurs, it will be placed into this buffer.
  • maxlength The maximum length of the error buffer.
  • rows Optional. If put, retrieves the number of rows the query returned.
  • fmt The query string that can be formated with format specifiers.
  • ... Additional arguments for formating the query.
Returns

1 on success, 0 on failure.

Назад
Верх