select a.id,a.catid,a.title,a.url,c.name as floor_name,d.name as lcspfl_name
from `dr_1_news` a
left join `dr_1_news_category_data` b
on a.catid = b.catid
left join `dr_linkage_data_3` c
on b.floor = c.id
left join `dr_linkage_data_4` d
on b.lcspfl = d.id
where c.id = 10;
這種用標(biāo)簽生成器工具可以直接出來代碼
參考文檔:《聯(lián)動(dòng)菜單(單選) Linkage》
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@迅??蚣芗夹g(shù)-關(guān)總 我在前臺(tái)不是做篩選,是直接獲取數(shù)據(jù),像下面的sql有沒有方法能實(shí)現(xiàn)呢?
sql是萬能的,當(dāng)然可以實(shí)現(xiàn)了
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@迅??蚣芗夹g(shù)-關(guān)總 關(guān)總,我是想問一下這種有聯(lián)動(dòng)菜單的文章列表在前臺(tái)該怎么渲染,(module module=news)這種方式好像不能獲取聯(lián)動(dòng)表數(shù)據(jù),何況我還要對(duì)聯(lián)動(dòng)表字段進(jìn)行篩選。
任何數(shù)據(jù)庫的內(nèi)容都可以用sql查詢出來