$aid=$GLOBALS['empire']->r['id']; $classid=$GLOBALS['empire']->r['classid']; $str=''; $bqrss = mysql_query("select a.tagname from {$dbtbpre}enewstags a left join {$dbtbpre}enewstagsdata b on a.tagid=b.tagid where b.id=$aid and b.classid=$classid"); while($row=mysql_fetch_assoc($bqrss)){ $tags.="<a href='/e/tags/?tagname=".urlencode($row['tagname'])."'>".$row['tagname']."</a>"; }