19 lines
661 B
Plaintext
19 lines
661 B
Plaintext
:sig
|
|
void mysql_disconnect(MySQL* m)
|
|
|
|
:params
|
|
m : pointer to an existing MySQL connection struct
|
|
|
|
:see
|
|
>mysql
|
|
|
|
:content
|
|
Closes an existing connection to a MySQL server.
|
|
|
|
Call this when you want to release a `MySQL*` connection handle before the request ends. UCE also closes any remaining MySQL handles automatically during request cleanup, including handles skipped by exceptions or fatal request recovery. A `MySQL*` is only valid inside the request that opened it; do not cache it across requests.
|
|
|
|
:example
|
|
MySQL* db = mysql_connect();
|
|
if(db != 0) { mysql_disconnect(db); print("connection closed\n"); }
|
|
else print("(requires a reachable MySQL server)\n");
|