mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-14990 implemented query loggin in new native DML drivers
This commit is contained in:
parent
b68bff82c9
commit
b4154c2d64
9 changed files with 105 additions and 36 deletions
|
@ -659,9 +659,10 @@ class mysqli_native_moodle_database extends moodle_database {
|
|||
|
||||
$this->query_start($sql, $params, SQL_QUERY_INSERT);
|
||||
$result = $this->mysqli->query($rawsql);
|
||||
$id = @$this->mysqli->insert_id; // must be called before query_end() which may insert log into db
|
||||
$this->query_end($result);
|
||||
|
||||
if (!$id = $this->mysqli->insert_id) {
|
||||
if (!$id) {
|
||||
throw new dml_write_exception('unknown error fetching inserted id');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue