Min-API

Min方法:Min API-Medoo使用指南

僤鯓⒐⒋嵵緔 提交于 2019-12-06 03:25:32
上一篇《Max方法:Max API-Medoo使用指南》中介绍了如何使用Medoo的Max方法来获取列的最大值,既然可以获取最大值,当然也有获取最小值的,不难想到最小值的方法就是Min方法。 Min方法:Min API,获取列的最小值。 min($table, $column, $where) //table [string]: 表名 //column [string]: 将要被计算的目标列 //where (可选)[array]:WHERE子句筛选记录 返回值: [number]:列的最小值。 提示:返回值的数据类型是数字。 $database = new medoo("my_database"); $min = $database->min("account", "age", [ "gender" => "male" ]); echo "The age of youngest male user is " . $min; Medoo版本: 0.9.1.1 原文标题: Min方法:Min API-Medoo使用指南 原文链接: http://loiy.net/post/613.html 来源: oschina 链接: https://my.oschina.net/u/1472023/blog/272553