Fatal error: Maximum execution time of 30 seconds exceeded in D:\AppServ\www\greenlife\includes\MysqliDb.php on line 1909

Fatal error: Uncaught exception 'Exception' with message '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 pm.mark_type ORDER BY pm.mark_type ASC LIMIT 1' at line 1 query: UPDATE `greenlife`.`sessions` LEFT JOIN `greenlife`.`goods` AS g on g.goods_sn=pm.product_no SET `expiry` = ?, `ip` = ?, `userid` = ?, `adminid` = ?, `user_name` = ?, `user_rank` = ?, `discount` = ?, `email` = ?, `rid` = ?, `click_id` = ?, `aff_sub` = ?, `data` = ? WHERE g.cat_id not in (-1) AND current_date between pm.start_date and pm.end_date AND pm.product_no = ? AND sesskey = ? GROUP BY pm.mark_type ORDER BY pm.mark_type ASC LIMIT 1' in D:\AppServ\www\greenlife\includes\MysqliDb.php:1927 Stack trace: #0 D:\AppServ\www\greenlife\includes\MysqliDb.php(1520): MysqliDb->_prepareQuery() #1 D:\AppServ\www\greenlife\includes\MysqliDb.php(855): MysqliDb->_buildQuery(1, Array) #2 D:\AppServ\www\greenlife\includes\cls_session.php(248): MysqliDb->update('`g in D:\AppServ\www\greenlife\includes\MysqliDb.php on line 1927