<?php 
namespace Common\Model;
use Think\Model;
class ArticleTagModel extends Model
{
 
	//通过文章ID获取TAG
	public function get_tag_qid($aid='')
	{
		$map['aid']=intval($aid);
		$tag= $this -> where($map)->select();
		foreach($tag as $v){
			$v['tagurl']=RU('tag/view',array('t'=>$v['tag'],'type'=>2));
			$tags[]=$v;
		}
		return $tags;
	}
	//通过TAGID获取最新
	public function get_tag_tagid($tagid='',$limit='')
	{
		$map['tagid']=intval($tagid);
		$tag= $this -> where($map)->order('id DESC')->limit($limit)->select();
		return $tag;
	}
	 
}
?>