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 '( real_id = 'nanun0506' ) order by record_type asc , grp_id desc , seq_id as' at line 1

query : from tbl_board where keycode='B02' AND ( real_id = 'nanun0506' ) ( real_id = 'nanun0506' ) order by record_type asc , grp_id desc , seq_id asc