Signature
stock SQL_SimpleQuery(Handle:db, const query[], error[] = " ", maxlength = 0, &rows = 0){ new Handle:hQuery = SQL_PrepareQuery(db, "%s", query); 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.
Parameters
- db — Connection handle returned from SQL_Connect().
- query — The query string.
- error — If an error occurs, it will be placed into this buffer.
- maxlength — Maximum length of the error buffer.
- rows — Optional. If put, retrieves the number of rows the query returned.
Returns
1 on success, 0 on failure.