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 | mixed * sl_exec(string statement, ...) |
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 | Executes the SQL statement <statement> for the current |
| 7 | SQLite database. The SQL statement may contain wildcards like |
| 8 | '?' and '?nnn', where 'nnn' is an integer. These wildcards |
| 9 | can be given as further parameters to sl_exec. With '?nnn' |
| 10 | the number of a specific parameter can be given, the first |
| 11 | parameter has number 1. |
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 | If the statement returns data, sl_exec returns an array |
| 14 | with each row (which is itself an array of columns) as |
| 15 | an element. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 16 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 17 | Pragma statements raise a privilege_violation ("sqlite_pragma", |
| 18 | ob, name, value). If the privilege is denied, an error is |
| 19 | thrown. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 20 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 21 | The function is available only if the driver is compiled with |
| 22 | SQLite support. In that case, __SQLITE__ is defined. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 23 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 24 | HISTORY |
| 25 | Added in LDMud 3.3.713. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 26 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 27 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 28 | sl_open(E), sl_insert_id(E), sl_close(E) |