Select * from cs_bbs_data where (code='skhcvc_gallery' and ccode='skhcvc') or (code='skhcvc_gallery' and sharing='Y' ) order by notice DESC, reg_date DESC LIMIT 48., 12