Db free-result

From SA-MP Wiki

Jump to: navigation, search

Db free-result


Free result memory from a db_query


Parameters:
(DBResult:dbresult)
DBResult:dbresultThe result to free
public OnPlayerText(playerid, text[])
{
        new query[256];
        format(query, sizeof(query), "INSERT INTO chat VALUES ('%d','%s')",playerid,text);
        db_free_result(db_query(CHATDB,query));
        //Note this is a really bad idea to use this code, as it would be easy to inject SQL code into.
        return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

  • db_free-result: Free result memory from a query
  • db_get_field: Get content of field with specified ID from current result row
Personal tools