How to Call related questions and answers in the Q & A module in dedecms

Source: Internet
Author: User
In dedecms, how do I call the questions and answers in the Q & A module? I want to call the questions and answers in the Q & A module, that is, display a question, then an answer, and how do I call it, I cannot use the SQL label. this is the label I wrote, but it cannot be used. I really cannot understand {dede: sqlsql = & quot; selectde_ask.id, how does dede_ask call the questions and answers in the Q & A module in dedecms?
I want to call the question and answer in the Q & A module, that is, to display a question and then an answer. how can I call it? I cannot use the SQL label to drop it. this is the label I wrote, but I cannot understand it.
{Dede: SQL = "select dede_ask.id, dede_ask.title, dede_askanswer.content from dede_ask left join dede_askanswer on dedede_ask.id = region where region = 1 and Region = 1 and Region = dede_askanswer.id order by de_ask.id desc LIMIT "}
Q: [field: title function = cn_substr (@ me, 52)/]
A: [field: content function = cn_substr (html2text (@ me), 48)/]... [details]
{Dede: SQL /}

------ Solution --------------------
#@__ Ask: Change it to your table name

{Dede: SQL = "select #@__ ask. id, #@__ ask. title, #@__ askanswer. content from #@__ ask left join #@__ askanswer on #@__ ask. id =#@__ askanswer. askid where #@__ askanswer. ifanswer = 1 and ##__ askanswer. ifcheck = 1 or #@__ ask. bestanswer =#@__ askanswer. id order by #@__ ask. id desc LIMIT 0, 1 "}

Q:[Field: title function = cn_substr (@ me, 46)/]

A:[Field: content function = cn_substr (html2text (@ me), 40)/],... details>



{/Dede: SQL}
------ Solution --------------------
Come to learn
------ Solution --------------------
Thanks for the solution provided by lijiancui.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.