MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | OPTIONAL |
| 2 | SYNOPSIS |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 3 | int * db_handles() |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 5 | DESCRIPTION |
| 6 | Returns an array with all open handles to the SQL-server. |
| 7 | As mySQL is most of the time limited to 100 connections, you |
| 8 | should not let this number grow too big. The handles are sorted |
| 9 | in a special order: The last used handle is the first one and |
| 10 | the handle that hasn't been used for the longest time is |
| 11 | the last one. If no handles are open, an empty array is returned. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 12 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 13 | The function is available only if the driver is compiled with |
| 14 | mySQL support. In that case, __MYSQL__ is defined. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 15 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 16 | The efun triggers a privilege violation ("mysql", "db_handles"). |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 17 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 18 | HISTORY |
| 19 | Added in 3.2.9 . |
| 20 | LDMud 3.2.11 added the privilege violation. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 21 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 22 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 23 | db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E), |
| 24 | db_connect(E), db_error(E), db_exec(E), db_fetch(E), db_insert_id(E), |
| 25 | mysql(C), privilege_violation(M) |