Home > Article > CMS Tutorial > 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
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!