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 = 'wjdengus12'  )   order by record_type asc , grp_id desc , seq_id a' at line 1
 query :  from tbl_board where keycode='B02'   AND (  real_id = 'wjdengus12'  )   (  real_id = 'wjdengus12'  )   order by record_type asc , grp_id desc , seq_id asc