POST TIME:2018-01-08 14:05
有很多朋友都希望自己的織夢問答功能更強一些 下面我們就來說說如何用dedecms調用仿百度ask問答的問題SQL語句:
{dede:sql sql=’SELECT 2dede_question.qid,2dede_question.title FROM 2dede_question order by qid asc limit 0,5′}
<li><a href=/ask/question.php?qid=[field:qid/] target=_blank >[field:title function="cn_substr(</a></li>
{/dede:sql}
{dede:sql sql='SELECT 2dede_question.qid,2dede_question.title,2dede_answer_1.content,2dede_answer_1.aid FROM 2dede_question,2dede_answer_1 WHERE 2dede_question.qid = 2dede_answer_1.aid order by qid desc limit 0,1'}
<a href=/ask/question.php?qid=[field:qid/] target=_blank >[field:title function="cn_substr(</a><br />
[field:content function="cn_substr(...<a href=/ask/question.php?qid=[field:qid/] target=_blank >詳細</a>
{/dede:sql}
將上面的2dede 更改成您的數(shù)據(jù)庫前綴就可以了.