From 56ebdcab0fa94c3cdeb1b7e9f5ceac31fe0e0620 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Mon, 15 Jan 2024 22:17:30 -0600 Subject: [PATCH] Fix broken SQL query when adding artwork for existing artist --- lib/Artist.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Artist.php b/lib/Artist.php index 7569dc45..efdec6e2 100644 --- a/lib/Artist.php +++ b/lib/Artist.php @@ -117,9 +117,10 @@ class Artist extends PropertiesBase{ $result = Db::Query(' SELECT a.* from Artists a - inner join ArtistAlternateSpellings aas using (ArtistId) + left outer join ArtistAlternateSpellings aas using (ArtistId) where a.UrlName = ? or aas.UrlName = ? + limit 1 ', [$artist->UrlName, $artist->UrlName], 'Artist'); if(isset($result[0])){