Skip to content

MySQL_RunStatement

imshooter edited this page Oct 31, 2026 · 2 revisions

Run a statement once and wait for it, as MySQL_Run does.

native bool:MySQL_RunStatement(Statement:statement, MYSQL_TAGS:...);

Parameters

Parameter Description
Statement:statement The statement.
MYSQL_TAGS:... A value for each specifier.

Returns

  • true when it succeeded.
  • false when it failed, the statement does not exist, the values do not match it, or a limit of the connection refused it.

Remarks

It waits as MySQL_Run does, so the statements and queries sent before it run first.

Example

new Statement:gCountItems;

stock CountItems(owner) {
    if (!MySQL_RunStatement(gCountItems, owner)) {
        return 0;
    }

    return MySQL_GetInt(0, "total");
}

Related

  • MySQL_ExecuteStatement: Run a statement once, after the queries sent before it.
  • MySQL_Run: Run a query and wait for it, after the queries sent before it.

Clone this wiki locally