Skip to content
Snippets Groups Projects
Commit 861a95c3 authored by Helmo's avatar Helmo
Browse files

Sync copies of db_mysql.inc.php

parent 40ce39d7
No related branches found
No related tags found
No related merge requests found
......@@ -719,8 +719,8 @@ class db
if($action == 'INSERT') $action = 'i';
if($action == 'UPDATE') $action = 'u';
if($action == 'DELETE') $action = 'd';
$sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data) VALUES (?, ?, ?, ?, ?, ?, ?)";
$app->db->query($sql, $db_table, $dbidx, $server_id, $action, time(), $username, $diffstr);
$sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data,session_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
$app->db->query($sql, $db_table, $dbidx, $server_id, $action, time(), $username, $diffstr, session_id());
}
return true;
......@@ -759,6 +759,9 @@ class db
$old_rec = array();
$index_value = $this->insertID();
if(!$index_value && isset($insert_data[$index_field])) {
$index_value = $insert_data[$index_field];
}
$new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value);
$this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment