Skip to content

Commit

Permalink
Bugfix, on session update save updated values
Browse files Browse the repository at this point in the history
  • Loading branch information
plepe committed Jun 23, 2019
1 parent eeec13c commit 662ff64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql.sessions.php
Expand Up @@ -81,7 +81,7 @@ public function _read($id){
}
public function _write($id, $data){
// Set query
$stmt = $this->db->prepare("INSERT INTO {$this->options['table']} (id, ts_access, ts_create, data) VALUES (:id, now(), now(), :data) ON DUPLICATE KEY UPDATE count = count + 1, ts_access = now()");
$stmt = $this->db->prepare("INSERT INTO {$this->options['table']} (id, ts_access, ts_create, data) VALUES (:id, now(), now(), :data) ON DUPLICATE KEY UPDATE count = count + 1, data = :data, ts_access = now()");
// Bind data
$stmt->bindValue(':id', $id, PDO::PARAM_STR);
$stmt->bindValue(':data', $data, PDO::PARAM_STR);
Expand Down

0 comments on commit 662ff64

Please sign in to comment.