POST TIME:2021-05-15 01:18
{dede:sql sql="select hos_ask.id,hos_ask.title,hos_askanswer.content from hos_ask LEFT JOIN hos_askanswer on hos_ask.id=hos_askanswer.askid where hos_askanswer.ifanswer=1 and hos_askanswer.ifcheck=1 and hos_ask.bestanswer=hos_askanswer.id order by hos_ask.id desc LIMIT 0,4"}
<ul> <li class="qua"><a href="/ask/?ct=question&askaid=[field:id/]" target="_blank">[field:title function=cn_substr(@me,60)/]</a></li> <li class="quo">[field:content function=cn_substr(html2text(@me),60)/]...<a href="/ask/?ct=question&askaid=[field:id/]">[详细]</a></li> </ul> {/dede:sql}
显示四行问答的代码
{dede:ask row='4' qtype='new' tid='0' titlelen='60'}
<li>·<a href="[field:url/]" target="_blank" >[field:title/]</a></li> {/dede:ask}