/** * 获取用户token的记录信息 * @param $ * @return array */ public function getRowByToken($token) { //使用缓存机制 $fileds = '* '; $where = " Where `tk_token`='{$token}' limit 1 "; $key = ''; $table = $this->table; $final = parent::getRowByKey($table, $fileds, $where, $key); return $final; }
/** * 获得用户总数 * @return array */ public function getCountUser() { $table = $this->table; $fileds = 'count(uid) as _sum'; $where = " "; $key = self::DATA_KEY . 'count'; $user = parent::getRowByKey($this->table, $fileds, $where, $key); return intval($user['_sum']); }