In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of weaving dream SQL to call the article and get the static address, the article is very detailed, has a certain reference value, interested friends must read it!
How does Dream Weaving SQL call articles and get static addresses?
The method of invoking the article and getting the static address by the dream-weaving SQL
Recommended study: dream weaving cms
As we all know, in the method of Dede system SQL calling the article and getting the static address, I can freely use the SQL call article and get the static address method SQL statement to cooperate with the dream tag SQL call article and obtain the static address method to make more personalized calls. The basic reference format is:
{dede:sql sql='select field From table name where conditional statement'} [field: field name /] {/ dede:sql}
From the above basic format, we can basically convert a call tag for calling the document list. The code SQL calls the article and gets the static address as follows:
{dede:sql sql='select * From dede_archives limit 10'} [field:title/] {/ dede:sql}
You can see that the underlying template address of the above document link is dynamic, so how do we convert it?
To link it to a static address, we only need to convert [field:id/]. The complete code after conversion is as follows:
{dede:sql sql= "SELECT * FROM dede_archives limit 10"} [field:title/] {/ dede:sql}
If it's a dede:php tag, it's pretty much the same, mainly using GetOneArchive, for example:
{dede:php} $dsql- > SetQuery ("SELECT * FROM dede_archives limit 10"); $dsql- > Execute (); while ($arr = $dsql- > getArray ()) {$arcurl = GetOneArchive ($arr ['aid']); echo' [field:title/]';} {/ dede:php} this is all about the method of weaving dream SQL to call the article and get a static address. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.