{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 rel="nofollow noopener noreferrer" href="/ask/question.php?id=[field:id/]">问:[field:title function=cn_substr(@me,40)/]</a>
答:[field:content function=cn_substr(html2text(@me),68)/]…<a rel="nofollow noopener noreferrer" 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 rel="nofollow noopener noreferrer" 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 rel="nofollow noopener noreferrer" href="/ask/question.php?id=[field:id/]" class="link2">详情>></a></p><br />{/dede:sql}
详细的调用数据多少条,还有长度,大家自己修改为自己想要的数就可以了。
本文dedecms中一问一答式调用问答模块问与答简介调用问答系统代码到此结束。行动是成功的阶梯,行动越多,登得越高。小编再次感谢大家对我们的支持!