去重是sql語(yǔ)句來(lái)實(shí)現(xiàn)的,和帝國(guó)本身無(wú)關(guān)。你可以這樣寫(xiě)SQL查詢?cè)囋嚳?/p>
創(chuàng)新互聯(lián)2013年至今,先為新鄭等服務(wù)建站,新鄭等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為新鄭企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。
select *, count(distinct supplier) from phome_ecms_product group by supplier
在本地搭建好環(huán)境以后,安裝cms到本地。
在列表頁(yè)處的【列表內(nèi)容模板(list.var) (*)】選擇框,選定□使用程序代碼
帝國(guó)CMS怎么過(guò)濾簡(jiǎn)介中的換行段落標(biāo)簽
重要的一步來(lái)了,加入代碼:
$r[smalltext]=str_replace(array("\r\n", "\r", "\n", "br /", "/p"),"",str_replace("p","",$r[smalltext]));
$listtemp=' h2 class="r"span[!--no.num--]./span a class="l" href="[!--titleurl--]" target="_blank"[!--title--]/a/h2
table width="80%" border="0" cellpadding="0" cellspacing="0"
tbody
tr
td[!--smalltext--]/td
/tr
tr
tdspan class="a"[!--titleurl--] - [!--newstime--]/span - a class="fl" href="[!--this.classlink--]" target="_blank"[!--this.classname--]/a/td
/tr
tr
td?/td
/tr
/tbody
/table';
①、$r[smalltext]的smalltext為簡(jiǎn)介字段,按需更改。
②、str_replace(array("\r\n", "\r", "\n", "br /", "/p"),"", 這段是把字段里的換行、空格、段落過(guò)濾掉
③、到前臺(tái)在看,簡(jiǎn)介字段就沒(méi)有html了,要過(guò)濾的內(nèi)容用雙引號(hào)括起來(lái)
④、本文只是提供一個(gè)思路,可自由發(fā)揮!
form?action="[!--news.url--]e/search/index.php"?method="post"?name="searchform"?id="searchform"
input?type="hidden"?name="show"?value="title"?/
input?type="hidden"?name="tempid"?value="1"?/
input?type="hidden"?name="tbname"?value="article"?/
input?class="schinput"?type="text"?name="keyboard"?onfocus="if(this.value=='請(qǐng)您在此輸入搜索關(guān)鍵字')this.value='';"?onblur="if(this.value=='')this.value='請(qǐng)您在此輸入搜索關(guān)鍵字';"?value="請(qǐng)您在此輸入搜索關(guān)鍵字"?/
input?type="submit"?name="Submit"?class="schbut"?value="搜?索"?/
/form
你應(yīng)該可以看懂,不懂的話,你用百度私信把QQ發(fā)給我吧,我加你QQ
form??id="searchform"?name="searchform"?method="post"?action="/e/search/index.php"?target="_blank"??????
input?style="float:left;"?class="main?text"?maxlength="70"??size="42"?type="text"?name="keyboard"?id="keyboard"?value=""?/????
input?type="hidden"?name="show"?value="title,smalltext"?/????
input?type="hidden"?name="tempid"?value="1"?/????
input?style="float:left;"??type="image"?value="?搜?索?"?src="/images/img/searchbutton.jpg"?//form
上面代碼是搜索標(biāo)題和簡(jiǎn)介的,你說(shuō)的全站搜索,只能搜索標(biāo)題和簡(jiǎn)介,內(nèi)容是無(wú)法參與搜索的
名稱欄目:帝國(guó)cms搜索過(guò)濾 帝國(guó)cms首頁(yè)調(diào)用其他網(wǎng)站數(shù)據(jù)
標(biāo)題URL:http://www.chinadenli.net/article34/ddohhpe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供移動(dòng)網(wǎng)站建設(shè)、微信小程序、建站公司、小程序開(kāi)發(fā)、品牌網(wǎng)站建設(shè)、
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容