dede織夢loop和sql標簽多表查詢對比,織夢技術
導讀:織夢技術[標dede模板堂簽:摘要]
dede織夢
前段時間用織夢開發商城時用到loop和sql標循環出產品列表頁內容,因為產品詳情內容需要跨越多個表獲取信息,所以對dede織夢的loop和sql標簽進行研究,發現兩個標簽都能夠進行多表查詢,以下是例子:
{dede:loop table='dede_category_brand b,dede_goods g,dede_category_series s' row='8' if='b.cat_id=g.cat_brand_id and g.cat_series_id=s.series_name and g.cat_id=72'}
[field:cat_name/]
[field:series_name/]
[field:goods_model/]
[field:shop_price/]
{/dede:loop}
{dede:sql sql='select * from dede_category_branddede織夢模板 b,dede_goods g,dede_category_series s where b.cat_id=g.cat_brand_id and g.cat_series_id=s.series_name and g.cat_id=71 limit 0,8'}
[field:cat_name/]
[field:series_name/]
[field:goods_model/]
[field:shop_price/]
{/dede:sql}相關織夢模板免費dede手機模板。
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-19 ,文章dede織夢loop和sql標簽多表查詢對比,織夢技術主要講述標簽,對比,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_30932.html