Select * from cs_bbs_data WHERE (code='notice' AND ccode='ywvc') OR (code='notice' AND sharing='Y' AND (ccode='' OR ccode='kcva') ) ORDER BY notice DESC, reg_date DESC LIMIT 0;, 10