From 92a8d9f22fb62cd359a95ba76da0bfccfd017a4c Mon Sep 17 00:00:00 2001 From: hellhker Date: Wed, 29 Apr 2020 18:33:12 +0800 Subject: [PATCH] fields->field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码实际为field方法 --- docs/Components/Mysqli/Chain/fieldsMethod.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Components/Mysqli/Chain/fieldsMethod.md b/docs/Components/Mysqli/Chain/fieldsMethod.md index ed10f111..04429975 100644 --- a/docs/Components/Mysqli/Chain/fieldsMethod.md +++ b/docs/Components/Mysqli/Chain/fieldsMethod.md @@ -6,33 +6,33 @@ meta: - name: keywords content: swoole|swoole 拓展|swoole 框架|EasySwoole mysqli|EasySwoole ORM|Swoole mysqli协程客户端|swoole ORM --- -# fields +# field 主要目的是查询时标识要返回的字段值 ## 指定字段 ```php -$builder->fields(['id','title'])->get('user_list'); +$builder->field(['id','title'])->get('user_list'); ``` ## 设置别名 ```php -$builder->fields(['id','title as notice'])->get('user_list'); +$builder->field(['id','title as notice'])->get('user_list'); ``` ## 使用SQL函数 ```php -$builder->fields(['id','SUM(score)'])->get('user_list'); +$builder->field(['id','SUM(score)'])->get('user_list'); ``` ## 传参说明 方法原型 ```php -function fields($fields) +function field($fields) ``` - $fields array|string 如果非数组时,只可传入一个字段名