Heim  >  Artikel  >  Backend-Entwicklung  >  ThinkPHP中有哪些统计查询方法

ThinkPHP中有哪些统计查询方法

PHPz
PHPzOriginal
2016-06-06 20:24:112823Durchsuche

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

ThinkPHP中有哪些统计查询方法

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

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

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

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

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

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

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

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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn