From 0ded6e24f7d53e74b3d9b3a327ffdc92df057f8f Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Mon, 11 Nov 2024 03:37:33 +0000 Subject: [PATCH] Update the query for updating the image repository. --- app/src/Domain/Repository/Image/ImageRepository.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/Domain/Repository/Image/ImageRepository.php b/app/src/Domain/Repository/Image/ImageRepository.php index 5e562a1..08e6aaf 100644 --- a/app/src/Domain/Repository/Image/ImageRepository.php +++ b/app/src/Domain/Repository/Image/ImageRepository.php @@ -76,9 +76,10 @@ class ImageRepository implements ImageRepositoryInterface { $query = "UPDATE images SET url = ?, - title = ?, - width = ?, - height = ? + title = ?, + width = ?, + height = ? + WHERE id = ? "; $results = $this->db->getConnection()->exec($query, [ @@ -86,6 +87,7 @@ class ImageRepository implements ImageRepositoryInterface $image->getTitle(), $image->getWidth(), $image->getHeight(), + $image->getId(), ]); return $results;