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