- select 欄位 from 主要資料表 left join 對應資料表 on 主要資料表.欄位=對應資料表.欄位 where 條件 order by 排序
- select * from x4df_tad_news as a left join x4df_tad_news_cate as b on a.ncsn=b.ncsn where b.not_news='0' and a.enable='1' order by a.start_day desc
- $sql = "select * from ".$xoopsDB->prefix("tad_news")." as a left join ".$xoopsDB->prefix("tad_news_cate")." as b on a.ncsn=b.ncsn whereb.not_news='0' and a.enable='1' order by a.start_day desc ";
|
沒有留言:
張貼留言