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

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