A Database Error Occurred

Error Number: 1064

syntax error, unexpected ')', expecting $end

select a.id, a.post_name, a.post_title, a.post_content, a.post_image, a.post_num, a.post_regdate, a.comment_count,a.post_grp, a.post_ord, a.login_id, a.issue_id, a.mission_id, a.research_id, a.survey_id, a.fiction_id, a.author_id, b.author_image, c.fiction_image, d.menu_name, d.menu_key, d.menu_group_key, (select menu_key from menu where menu_group=(select menu_group from menu where menu_key=d.menu_key) and menu_depth >= 1 order by menu_group, menu_order limit 1) domain_key, (select concat('#',group_concat(distinct(tag_name) separator ' #')) tag_name from hashtag where id in (select hashtag_id from post2hashtag where post_id=a.id)) as post_tags , (SELECT issue_subject FROM issue i WHERE i.id=issue_id) issue_title , (SELECT research_subject FROM research r WHERE r.id=research_id) research_title , (SELECT survey_subject FROM survey s WHERE s.id=survey_id) survey_title , (SELECT mission_subject FROM mission m WHERE m.id=mission_id) mission_title from ( select * from post where post_status = 'publish' and menu_id in (select id from menu where menu_key in ('mission','research','issue','survey','story','she','pot')) and (post_name like '%000원)%' or post_title like '%000원)%' or MATCH(post_content) AGAINST('000원)*' IN BOOLEAN MODE) or id in (select post_id from post2hashtag where hashtag_id in (select id from hashtag where tag_name = '000원)')) or fiction_id IN (SELECT id FROM AZOOMMA.fiction WHERE fiction_title LIKE '%000원)%' OR fiction_name LIKE '%000원)%' ) or author_id IN (SELECT id FROM AZOOMMA.author WHERE author_title LIKE '%000원)%' OR author_name LIKE '%000원)%' ) or issue_id IN (SELECT id FROM AZOOMMA.issue WHERE issue_subject LIKE '%000원)%' ) or research_id IN (SELECT id FROM AZOOMMA.research WHERE research_subject LIKE '%000원)%' ) or survey_id IN (SELECT id FROM AZOOMMA.survey WHERE survey_subject LIKE '%000원)%' ) or mission_id IN (SELECT id FROM AZOOMMA.mission WHERE mission_subject LIKE '%000원)%' ) ) order by post_grp, post_ord limit 0, 5 ) a left join author b on a.author_id=b.id left join fiction c on a.fiction_id=c.id left join menu d on a.menu_id=d.id order by a.post_grp, a.post_ord

Filename: models/Mainmodel.php

Line Number: 985