Home > CMS Tutorial > DEDECMS > How to get the top column name based on the subordinate columns in DreamWeaver

How to get the top column name based on the subordinate columns in DreamWeaver

藏色散人
Release: 2020-01-04 09:46:11
Original
2330 people have browsed it

How to get the top column name based on the subordinate columns in DreamWeaver

How does Dreamweaver get the top column name based on the lower-level columns?

Dreamweaver DEDECMS obtains the top column name according to the lower-level columns

Recommended learning:Dreamweavercms

SQL statement implementation

{dede:field.typeid runphp='yes'}$ID = @me; $sql = "SELECT * FROM `dede_arctype` WHERE id=$ID";
$query = mysql_query($sql);$row=mysql_fetch_array($query); $relID = "$row[reid]"; if($relID == 0) {
@me = $row[typename];}else{$sql = "SELECT `typename` FROM `dede_arctype` WHERE id=$relID";
$query = mysql_query($sql);$row=mysql_fetch_array($query); @me = $row[typename];}{/dede:field.typeid
Copy after login

The above is the detailed content of How to get the top column name based on the subordinate columns in DreamWeaver. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template