织梦dedecms调用仿百度ask问答的问题SQL语句 ,
有很多朋友都希望自己的问答功能更强一些 下面我们就来说说如何用dedecms调用仿百度ask问答的问题SQL语句。
{dede:sql sql=’SELECt cy1_question.qid,cy1_question.title FROM cy1_question order by qid asc limit 0,5′}
[field:title function="cn_substr(
{/dede:sql}
{dede:sql sql='SELECt cy1_question.qid,cy1_question.title,cy1_answer_1.content,cy1_answer_1.aid FROM cy1_question,cy1_answer_1 WHERe cy1_question.qid = cy1_answer_1.aid order by qid desc limit 0,1'}
[field:title function="cn_substr(
[field:content function="cn_substr(...详细
{/dede:sql}
将上面的cy1 更改成您的数据库前缀就可以了