在dedecms 中怎样调用问答模块中的有关问题和答案

WBOY
Release: 2016-06-13 13:31:14
Original
737 people have browsed it

在dedecms 中怎样调用问答模块中的问题和答案
我想调用问答模块中的问题和答案,就是显示一条问题,然后是一条答案,怎么调用啊,我用sql标签掉不出来,这是我写的标签,可就是不出来啊,实在是弄不懂
{dede:sql sql="select dede_ask.id,dede_ask.title,dede_askanswer.content from dede_ask LEFT JOIN dede_askanswer on dede_ask.id=dede_askanswer.askid where dede_askanswer.ifanswer=1 and dede_askanswer.ifcheck=1 and dede_ask.bestanswer=dede_askanswer.id order by dede_ask.id desc LIMIT 0,3"}
 

问:[field:title function=cn_substr(@me,52)/]
答:[field:content function=cn_substr(html2text(@me),48)/]...[详细]
{dede:sql/}

------解决方案--------------------
#@__ask将它改为自己的表名

{dede:sql sql="select #@__ask.id,#@__ask.title,#@__askanswer.content from #@__ask LEFT JOIN #@__askanswer on #@__ask.id=#@__askanswer.askid where #@__askanswer.ifanswer=1 and #@__askanswer.ifcheck=1 or #@__ask.bestanswer=#@__askanswer.id order by #@__ask.id desc LIMIT 0,1"}

问:[field:title function=cn_substr(@me,46)/]

答:[field:content function=cn_substr(html2text(@me),40)/],...详情>>



{/dede:sql}
------解决方案--------------------
来掌学习学习呀
------解决方案--------------------
同样的问题 用lijiancui提供的方法解决了 非常感谢
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template