in Dede CMS, sometimes need to do multi-table check, at this time only through the SQL statement to invoke the document, but with the default [field:arcurl/] can not get the document's link address, after the online search, find the call "article link Address" method, as follows:In Dede, you can freely use SQL statements to make more personalized calls with Dede tags. A method that invokes a document list and obtains its static page address through an SQL statement.the basic Reference format is:{dede:sql sql= ' select field from table name ' WHERE Condition statement '}[Field: Field name/]{/dede:sql}by this basic format, we can basically convert a call tag that calls a list of documents, with the following code:{dede:sql sql= ' select * from Dede_archives limit '}<a href= ". /plus/view.php?aid=[field:id/] ">[field:title/]</a>{/dede:sql}The underlying template address for the above document link is dynamic, so how do you convert it to a static address, where you only need to convert [Field:id/] and the full code after the conversion is:{dede:sql sql= "select * from Dede_archives limit"}<li><a href= ' [field:id runphp= ' yes '] [email protected]; @me = '; $url =getonearchive ($id); @me = $url [' Arcurl ']; [/field:id] ' title= "[field:title/]" target= "_blank" >[field:title function=cn_substr (@me, 30,0)/]</a></li>{/dede:sql}
DEDE CMS use DEDE SQL tag to get article link address