dede根据任意栏目id获取顶级栏目名称的自定义函数
作者:互联网
01 | //获取顶级栏目名 |
02 | function GetTopTypenameById($ id ) |
03 | { |
04 | global $dsql; |
05 | $row = $dsql->GetOne( "SELECT typename,topid FROM idea_arctype WHERE id= $id" ); |
06 | if ($row[ 'topid' ] == '0' ) |
07 | { |
08 | return $row[ 'typename' ]; |
09 | } else { |
10 | $row1 = $dsql->GetOne( "SELECT typename FROM idea_arctype WHERE id= $row[topid]" ); |
11 | return $row1[ 'typename' ]; |
12 | } |
13 | } |
标签:栏目,自定义,dsql,typename,topid,dede,id,row 来源: https://blog.csdn.net/zxy840552216/article/details/120372232