What is the SQL statement used to obtain the current article ID on the Dreamweaver document page?
Dreamweaver DEDECMS document page gets the sql statement of the current article ID
The following is the code to implement dedecms to get the current article ID and display the thumbnail, if you are interested Friends can study and study:
Recommended study: dedecms tutorial
{dede:sql sql='Select * from dede_archives where id=~id~'} <!--从dede_archives表中查询当前文章ID所对应的相关信息--> <img src="[field:litpic/]" alt="[field:title/]" style="max-height:150px; max-width:170px;" /> {/dede:sql}
The above content is reproduced, expand to obtain the main table and additional table field information where the current document is located:
{dede:sql sql='Select down,title from dede_addonarticle JOIN dede_archives ON dede_addonarticle.aid = dede_archives.id where id = ~id~'} <a href='[field:down/]' target='_blank'>[field:title/]</a> {/dede:sql}
In the above example, down is a new field. When using it, make changes according to the situation.
The above is the detailed content of What is the SQL statement used to obtain the current article ID on the DreamWeaver document page?. For more information, please follow other related articles on the PHP Chinese website!