Repository navigation
MySQL_AddRow
imshooter edited this page Oct 24, 2026
·
1 revision
Add a row of values to a batch. The values are copied at once.
native bool:MySQL_AddRow(Batch:batch, MYSQL_TAGS:...);| Parameter | Description |
|---|---|
Batch:batch |
The batch. |
MYSQL_TAGS:... |
A value for each specifier of its statement. |
-
truewhen the row was added. -
falsewhen the batch does not exist or the values do not match its statement, and nothing is added.
The values are copied at once, so one array can be filled again for the next row. A row whose values do not match the statement is not added, and the rows before it stay.
new Statement:gSaveScore;
stock SaveScores(const ids[]) {
new const
Batch:batch = MySQL_CreateBatch(gSaveScore)
;
for (new i; i != MAX_PLAYERS; ++i) {
if (IsPlayerConnected(i)) {
MySQL_AddRow(batch, GetPlayerScore(i), ids[i]);
}
}
MySQL_ExecuteBatch(batch);
}- MySQL_CreateBatch: Start a batch of rows for a statement.
- MySQL_GetBatchRows: The rows added to a batch.
- MySQL_ExecuteBatch: Send the rows of a batch after the queries sent before it, and forget it, also when it is refused.
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