search
HomeCMS TutorialDEDECMSWhat is the SQL statement used to obtain the current article ID on the DreamWeaver document page?

What is the SQL statement used to obtain the current article ID on the DreamWeaver document page?

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=&#39;Select * from dede_archives where id=~id~&#39;}  <!--从dede_archives表中查询当前文章ID所对应的相关信息-->   
<img src="/static/imghwm/default1.png"  data-src="[field:litpic/]"  class="lazy"   alt="[field:title/]"   style="max-width:90%" />    
{/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=&#39;Select down,title from dede_addonarticle JOIN 
dede_archives ON dede_addonarticle.aid = dede_archives.id where id = ~id~&#39;} 
       <a href=&#39;[field:down/]&#39; target=&#39;_blank&#39;>[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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft