_table = 'common_member_wechat'; $this->_pk = 'uid'; $this->_pre_cache_key = 'common_member_wechat_'; parent::__construct(); } public function fetch_by_openid($openid) { return DB::fetch_first('SELECT * FROM %t WHERE openid=%s', array($this->_table, $openid)); } }