Home  >  Article  >  Backend Development  >  ThinkPHP中有哪些统计查询方法

ThinkPHP中有哪些统计查询方法

PHPz
PHPzOriginal
2016-06-06 20:24:112824browse

ThinkPHP中的统计查询方法有:1、count();2、max();3、min();4、avg();5、sum()。count()方法表示查询表中总的记录数;max()方法表示查询某个字段的最大值。

ThinkPHP中有哪些统计查询方法

ThinkPHP中有哪些统计查询方法?

在ThinkPHP中系统提供以下几个查询方法的使用,方便于在后期需要做统计的使用。

• count() 表示查询表中总的记录数

• max() 表示查询某个字段的最大值

• min() 表示查询某个字段的最小值

• avg() 表示查询某个字段的平均值

• sum() 表示求出某个字段的总和

更多相关知识,请访问PHP中文网

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn