dede首页调用专题页描述和链接方法


因为最近做的站用到专题页,首页调用专题页的描述,找了一些方法都是不成功,后来请一个数据库高手给我写了个sql语句,发现问题原来是出在sql语句上,自己写的语句太过繁琐,而且容易出错,弄了好几天,终于写出来了,先分享给大家,希望能给有此问题的朋友解解疑惑。

                     {dede:arclist  id=11 row=1  channelid=”-1″  type=”spec.” }

                     /*如需同时调用多个,可设置row=n,我这里只调用了一条,还可以做相应的排序处理orderby=pubdate */
                    <div class=”record_product_description”>
                    [field:array runphp=’yes’]
                    global $dsql;
                    @me =@me[‘id’];
                    $sql = “select t.description from addonspec a, archives t where a.aid=t.id and t.id=11”;
                    $dsql->Execute(‘a’,$sql);
                    $one = $dsql->GetArray(‘a’);
                    @me =substr(Html2Text($one[‘description’]),0,660);
                    [/field:array]… 
                    </div>
                    <div class=”record_more”><a href=”[field:arcurl/]”>[field:typename/]</a></div>
                    {/dede:arclist}