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