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_insert_id(int handle) |
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 | After inserting a line into a table with an AUTO_INCREMENT field, |
| 7 | this efun can be used to return the (new) value of the AUTO_INCREMENT |
| 8 | field. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 9 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 10 | The function is available only if the driver is compiled with |
| 11 | mySQL support. In that case, __MYSQL__ is defined. |
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 efun triggers a privilege violation ("mysql", "db_insert_id"). |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 14 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 15 | HISTORY |
| 16 | Added in 3.2.9 . |
| 17 | LDMud 3.2.11 added the privilege violation. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 18 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 19 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 20 | db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E), |
| 21 | db_connect(E), db_error(E), db_exec(E), db_fetch(E), db_handles(E), |
| 22 | mysql(C), privilege_violation(M) |