From e7c5e2ca9d9f44bfe03be28835742ce0d1546fa6 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 May 2023 16:27:31 +0300 Subject: [PATCH] GROUP_CONCAT host image descriptions --- config/sphinx.conf.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/sphinx.conf.txt b/config/sphinx.conf.txt index b2c9dbb..1e06c9d 100644 --- a/config/sphinx.conf.txt +++ b/config/sphinx.conf.txt @@ -34,11 +34,9 @@ source hostImage : common { sql_query = \ SELECT hostImage.hostImageId, hostImage.rank, hostImage.uri, host.name, \ - (SELECT CONCAT_WS(' ', hostImageDescription.alt, hostImageDescription.title) \ + (SELECT GROUP_CONCAT(CONCAT_WS(' ', hostImageDescription.alt, hostImageDescription.title)) \ FROM hostImageDescription \ - WHERE hostImageDescription.hostImageId = hostImage.hostImageId \ - ORDER BY hostImageDescription.timeUpdated DESC, hostImageDescription.timeAdded DESC \ - LIMIT 1) AS imageDescription \ + WHERE hostImageDescription.hostImageId = hostImage.hostImageId) AS imageDescription \ FROM hostImage \ JOIN host ON (host.hostId = hostImage.hostId) \ WHERE host.status = '1' AND hostImage.httpCode = 200 AND hostImage.timeBanned IS NULL \