Error Info: MySQL Query Error
The URL Is: http://ezone2.ulifestyle.com.hk/channelnews.php?id=19401
Errno: 1064
Error: 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 'and n.display_date <= NOW() and n.display_date >= DATE_ADD(NOW(), INTERVAL -1 DA' at line 1
SQL: SELECT n.*, d.mainimage, c.name as `channelName`, c.cssclass as `channelcss` FROM `doc_channelnews` n inner join `cms_channel` c on n.channel = c.id inner join `site_document` d on n.documentid = d.documentid WHERE n.`status` = '1' and d.`status` = '1' and n.category = '1' and n.published = '1' and n.channel = and n.display_date <= NOW() and n.display_date >= DATE_ADD(NOW(), INTERVAL -1 DAY) and ((d.active_date = '0000-00-00' or (d.active_date <= CURDATE() and d.inactive_date = '0000-00-00')) or (d.inactive_date != '0000-00-00' and d.active_date != '0000-00-00' and d.active_date <= CURDATE() and d.inactive_date > CURDATE())) ORDER BY RAND() LIMIT 8