現(xiàn)在越來越多的人選擇用cms進(jìn)行網(wǎng)站建設(shè),在網(wǎng)站制作的時(shí)候有一部分人選擇使用dedecms 去做,今天講一下用dedecms讀取后臺文章列表的某個(gè)字段怎么讀取的問題,請仔細(xì)看下下面的代碼,
后臺列表讀取某字段 先從 content_list.php 中 208行
$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake,
arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.weight,arc.mid
FROM `$maintable` arc
$whereSql
ORDER BY $orderbyField DESC";
這段語句中加入字段名稱, 在content_list.htm 中才能調(diào)用
按權(quán)重排序 把content_list.php的205行 $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby);
中的id 改成weight 就可以了
怎么樣你學(xué)會了嗎?
Now more and more people choose to use cms for website building, website production, when in some people choose to use dedecms do today to talk about the list of articles with the background dedecms read how to read a field problem, carefully look the following code: