from 資料表 as a left join 資料表 as b on 欄位a =
欄位b left join 資料表 as c on 欄位a = 欄位c
where 撈資料條件
$sql = "select a.nsn,b.nc_title,a.start_day,a.news_title,a.uid,a.enable_group,a.have_read_group,a.prefix_tag,c.sign_unit from ".$xoopsDB->prefix("tad_news")." as a left join ".$xoopsDB->prefix("tad_news_cate")." as b on a.ncsn=b.ncsn left join ".$xoopsDB->prefix("ugm_sign_news")." as c on a.nsn=c.nsn where b.not_news='0' and a.enable='1' order by a.start_day desc ";
沒有留言:
張貼留言