The method of weaving dreams to get the name of the top column according to the subordinate column
This article will explain in detail the method of weaving dreams to get the names of top columns according to subordinate columns. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
How does dream weaving get the top column name according to the subordinate column?
Dream weaving DEDECMS gets the top column name according to the subordinate column.
Recommended study: dream weaving cms
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 about dream weaving according to the subordinate column to get the top column name sharing here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.