🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### find **从数据表中查找一条记录** **参数** conditions : 查找条件,数组array("字段名"=>"查找值")或字符串, 请注意在使用字符串时请自行使用\_\_val\_escape来对输入值进行过滤 sort: 排序,等同于“ORDER BY ” fields: 返回的字段范围,默认为返回全部字段的值 ~~~ public function find($conditions = null, $sort = null, $fields = null) { if ($record = $this->findAll ( $conditions, $sort, $fields, 1 )) { return array_pop ( $record ); } else { return FALSE; } } ~~~