MySQL Fatal Error
MySQL Error!
MySQL error in file: /engine/modules/events_new.php at line 160
Error Number: 1064
The Error returned was:
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 'ORDER BY SUBSTRING(xfields, INSTR(xfields,'event_period')+13, 10) ASC' at line 1
SQL query:

SELECT * FROM `dle_post` WHERE xfields LIKE "%event_period%" AND xfields LIKE "%event_period2%" AND category LIKE "%394%" AND (SUBSTRING(xfields, INSTR(xfields,'event_period')+13, 10) BETWEEN '2018-08-01' AND '2018-08-31' OR SUBSTRING(xfields, INSTR(xfields,'event_period2')+14, 11) BETWEEN '2018-08-01' AND '2018-08-31') LIMIT 5 OFFSET 0 ORDER BY SUBSTRING(xfields, INSTR(xfields,'event_period')+13, 10) ASC