Repository navigation
MySQL_Execute
imshooter edited this page Oct 24, 2026
·
1 revision
Run a statement once, after the queries sent before it.
Inside the public, the result is the one the MySQL_Get natives read, as for a query.
native bool:MySQL_Execute(Statement:statement, const callback[] = "", context = 0, MYSQL_TAGS:...);| Parameter | Description | Default |
|---|---|---|
Statement:statement |
The statement. | |
const callback[] |
Public to call when it is done, or none. | "" |
context |
Value the public receives. | 0 |
MYSQL_TAGS:... |
A value for each specifier. |
-
truewhen it was sent. -
falsewhen the statement does not exist, the values do not match it, or a limit of the connection refused it.
It runs after the queries and statements sent before it, and its public behaves as the one of MySQL_Query: results are read with the same natives. The values are copied when it is called, so the arrays they came from can change at once.
The values must match the specifiers of the statement in number, or nothing is sent.
new Statement:gFindPlayer;
forward OnPlayerFound(playerid);
public OnPlayerConnect(playerid) {
new
name[MAX_PLAYER_NAME + 1]
;
GetPlayerName(playerid, name, sizeof (name));
MySQL_Execute(gFindPlayer, "OnPlayerFound", playerid, name);
return 1;
}
public OnPlayerFound(playerid) {
if (MySQL_GetRowCount() != 0) {
SetPlayerScore(playerid, MySQL_GetInt(0, "score"));
}
return 1;
}- MySQL_Prepare: Prepare a statement, with a specifier for each value.
-
MySQL_RunStatement: Run a statement once and wait for it, as
MySQL_Rundoes. -
MySQL_Query: Send a query, and call a public with
contextwhen it is done.
MySQL 0.2.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- Results
- JSON cells
- Prepared statements
- Passwords
- Errors
- TLS
- Coming from R41
- Performance
Reference
Functions