Repository navigation
OnMySQLError
imshooter edited this page Oct 24, 2026
·
1 revision
A query failed, before its public is called.
public OnMySQLError(MySQL:handle, errorid, const error[], const query[], const callback[])| Parameter | Description |
|---|---|
MySQL:handle |
Handle it was sent through. |
errorid |
Error number of MySQL. |
const error[] |
Message of the error. |
const query[] |
Start of the query, up to 1024 characters. |
const callback[] |
Public of the query, empty when it has none. |
It is called in the script that sent the query, for every query, statement and batch that fails, also those sent without a public and those waited for, before the public of the query. The component also logs the error, unless log_errors is off. See Errors.
public OnMySQLError(MySQL:handle, errorid, const error[], const query[], const callback[]) {
new
line[256]
;
format(line, sizeof (line), "MySQL error %i in %s: %s", errorid, callback[0] != EOS ? callback : ("a query without a public"), error);
for (new i; i != MAX_PLAYERS; ++i) {
if (IsPlayerConnected(i) && IsPlayerAdmin(i)) {
SendClientMessage(i, -1, line);
}
}
return 1;
}- MySQL_GetErrno: The error of the query read.
- MySQL_GetError: The message of the error of the query read.
-
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