gets() public method

获取表的一段数据,查询的参数由$params指定
public gets ( $params, &$pager = null ) : array
$params
$pager Pager
return array
コード例 #1
0
ファイル: DBCache.php プロジェクト: kilmas/framework
 function get($key)
 {
     $gets['sid'] = $this->shard_id;
     $gets['limit'] = 1;
     $gets['order'] = '';
     $gets['select'] = 'id,cvalue,expire';
     $gets['ckey'] = $key;
     $rs = $this->model->gets($gets);
     if (empty($rs)) {
         return false;
     }
     return $this->_filter_expire($rs[0]);
 }