Skip to content

mysql_set_option

imshooter edited this page Nov 29, 2026 · 1 revision

Set an option of a set.

AUTO_RECONNECT is always on. POOL_SIZE is the connections of mysql_pquery, 4 by default, from 0 to 32. CHARSET is the character set, latin1 by default, the code page of the game. SSL_ENABLE requires TLS, and SSL_VERIFY also verifies the certificate of the server against SSL_CA_FILE or SSL_CA_PATH. SSL_FINGERPRINT requires the certificate of the server to have that SHA1 to SHA512 fingerprint. CONNECT_TIMEOUT, READ_TIMEOUT and WRITE_TIMEOUT are seconds, and SLOW_QUERY the milliseconds from which a query is logged. MAX_QUERY_LENGTH, MAX_PENDING and MAX_QUERIES_PER_SECOND refuse queries past them, and 0 sets no limit. ERROR_CALLBACK calls the public of a failed query too, after OnQueryError.

native bool:mysql_set_option(MySQLOpt:option_id, E_MYSQL_OPTION:type, ...);

With open.mp names, from the same include:

native bool:MySQL_SetOption(MySQLOpt:option_id, E_MYSQL_OPTION:type, ...);

Parameters

Parameter Description
MySQLOpt:option_id The options.
E_MYSQL_OPTION:type The option.
... Its value, an integer, a bool or a string.

Returns

  • true when it was set.
  • false when the options or the option do not exist, or the value is not valid.

Home

Guides

Reference

Functions

Connections
Queries
Cache
JSON cells
ORM
Queries built in pieces
Prepared statements
Batches
Transactions
Passwords
Callbacks

Clone this wiki locally