function GetTags_list($aid) { global $dsql; $tags = ''; $query = "SELECT tag FROM `taglist` WHERE aid='$aid' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= ($tags=='' ? "<a href='/tags.php?/".urlencode($row['tag'])."'>".$row['tag']."</a>" : ','."<a href='/tags.php?/".urlencode($row['tag'])."'>".$row['tag']."</a>"); } return $tags; } |
function GetTags($aid){ global $dsql; $tags = ''; $query = "Select tag From `tf_taglist` where aid='$aid' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= ($tags=='' ? $row['tag'] : ','.$row['tag']); } return $tags;}修改为//获得某文档的所有tag function GetTags($aid) { global $dsql; $tags = ''; $query = "Select tag From `dede_taglist` where aid='$aid' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags.= ($tags=='' ? "<a href=/tags.php?/{$row['tag']} target=_blank>{$row['tag']}</a>" : ','."<a href=/tags.php?/{$row['tag']} target=_blank>{$row['tag']}</a>"); } return $tags; } |
新闻热点
疑难解答