You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND e2.event_start_date >= CURDATE()
and post_date <= CURDATE()
' at line 20:
SELECT *,
e2.event_id,
e2.sub_name,
e2.event_start_date,
(
SELECT COUNT(*)
FROM (
SELECT TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX('', ' ', n), ' ', -1)) AS word
FROM (
SELECT 1 AS n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL
SELECT 9 UNION ALL SELECT 10
) nums
) stripped_words
WHERE REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(e2.sub_name), 'musichall', ''), 'signature', ''), 'limited', ''), 'michianaevents', ''), 'first', '')
REGEXP CONCAT('(^| )', stripped_words.word, '( |$)')
) AS match_score
FROM calendar_event e2
WHERE e2.wt_master_id !=
AND e2.event_start_date >= CURDATE()
and post_date <= CURDATE()
ORDER BY match_score DESC limit 8
Oops! No Artists
Change your dates or pick another genre...