织梦dedecms中一问一答式调用问答模块问与答简介调用问答系统代码: {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 wh
{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,2"} <a href="/ask/question.php?id=[field:id/]">问:[field:title function=cn_substr(@me,40)/]</a> 答:[field:content function=cn_substr(html2text(@me),68)/]…<a href="/ask/question.php?id=[field:id/]" class="color1">[详细]</a> {/dede: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 or dede_ask.bestanswer=dede_askanswer.id order by dede_ask.id desc LIMIT 0,3"} <strong>问:</srtong><a href="/ask/question.php?id=[field:id/]" class="link3">[field:title function=cn_substr(@me,46)/]</a> <p><strong>答:</srtong>[field:content function=cn_substr(html2text(@me),40)/],…<a href="/ask/question.php?id=[field:id/]" class="link2">详情>></a></p><br />{/dede:sql} 详细的调用数据多少条,还有长度,大家自己修改为自己想要的数就可以了。