_table = 'user_wechat'; $this->_pk = 'uid'; parent::__construct(); } function fetch_by_openid($openid,$appid){ return DB::fetch_first("select * from %t where openid=%s and appid=%s",array($this->_table,$openid,$appid)); } } ?>