Repository navigation
MySQL_Format
imshooter edited this page Oct 24, 2026
·
1 revision
Format a query into an array.
native MySQL_Format(MySQL:handle, output[], size, const format[], MYSQL_TAGS:...);| Parameter | Description |
|---|---|
MySQL:handle |
Handle whose escaping is used. |
output[] |
Array for the query. |
size |
Size of the array. |
const format[] |
The query, formatted with the values after it. |
MYSQL_TAGS:... |
Values for the specifiers of the query, in order. |
- The length of the query.
-
-1when it does not fit, and nothing is written, or the format is not valid.
It formats as a query does, with the escaping of the handle, into an array. A query sent with MySQL_Query is formatted by the component and needs no array, so this suits a query kept to be sent later or shown.
new MySQL:gDatabase;
stock ShowQuery(playerid, const name[]) {
new
query[128]
;
if (MySQL_Format(gDatabase, query, sizeof (query), "SELECT * FROM players WHERE name = %q", name) != -1) {
SendClientMessage(playerid, -1, query);
}
}- MySQL_CreateQuery: Start a query to build a piece at a time.
- MySQL_Send: Send a query that needs no answer.
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