WordPress-Datenbank-Fehler: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY days.tid
ORDER BY RAND()
' at line 34]
SELECT
tour.*,
tour.tid as typeid,
tour.title as name,
dest.desttitle,
dest.desttitle_clean,
pics.picid,
pics.original,
pics.original_size,
pics.normal,
pics.normal_size,
pics.small,
pics.small_size,
COUNT(days.dayid) as tage
FROM
wp_hxa_tour as tour
LEFT JOIN
wp_hxa_dest AS dest ON (dest.destid = tour.destid)
LEFT JOIN
wp_hxa_tour_days AS days ON (days.tid = tour.tid)
LEFT JOIN
wp_hxa_tour_pics as pics on (pics.picid = tour.defaultpic)
WHERE tour.visible = 1
AND NOT tour.tid =
GROUP BY days.tid
ORDER BY RAND()
LIMIT 4