From 76e9f7327ac5d21e54bed4c9bdb36c0435ce74bd Mon Sep 17 00:00:00 2001 From: Lukas Metzger Date: Thu, 5 Apr 2018 17:17:59 +0200 Subject: [PATCH] Fixed bug where every record got changed by a record update --- backend/src/operations/Records.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/operations/Records.php b/backend/src/operations/Records.php index 518de71..d916134 100644 --- a/backend/src/operations/Records.php +++ b/backend/src/operations/Records.php @@ -297,7 +297,8 @@ class Records $priority = $priority === null ? intval($record['prio']) : $priority; $ttl = $ttl === null ? intval($record['ttl']) : $ttl; - $query = $this->db->prepare('UPDATE records SET name=:name,type=:type,content=:content,prio=:priority,ttl=:ttl'); + $query = $this->db->prepare('UPDATE records SET name=:name,type=:type,content=:content,prio=:priority,ttl=:ttl WHERE id=:recordId'); + $query->bindValue('recordId', $recordId); $query->bindValue(':name', $name); $query->bindValue(':type', $type); $query->bindValue(':content', $content);