Skip to content

MySQL_Close

imshooter edited this page Oct 24, 2026 · 1 revision

Close a handle after running every query still waiting.

The publics of those queries are not called. The script that connected closes its handles itself when it unloads.

native bool:MySQL_Close(MySQL:handle);

Parameters

Parameter Description
MySQL:handle Handle to close.

Returns

  • true when it was closed.
  • false when it does not exist.

Remarks

Every query still waiting runs before the connections close, and the native returns when they are done, so nothing sent before it is lost. Their publics are not called. A handle is also closed when the script that made it unloads.

Example

new MySQL:gDatabase;

public OnGameModeExit() {
    MySQL_Close(gDatabase);

    return 1;
}

Related

Clone this wiki locally