Возникла ошибка - 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 'id #5 AND elements.elements_draft=1 AND elements.elements_date<'2024-11-23 16...' at line 5
SELECT elements_id0, elements_title, elements_seo_url, elements_notes, elements_type_url_prefix
FROM elements
LEFT JOIN elements_to_tags on elements.elements_id0=elements_to_tags.elements_to_tags_elements_id
LEFT JOIN elements_type on elements.elements_type_id=elements_type.elements_type_id0
WHERE elements_to_tags.elements_to_tags_tags_id=10 AND elements.elements_id0<>Resource id #5 AND elements.elements_draft=1 AND elements.elements_date<'2024-11-23 16:32:04'
ORDER BY elements.elements_id0 DESC
LIMIT 0,4