php - 如何从 mysql 表 PHP 中获取最大整数值

标签 php mysql

如何从 PHP mysql 表中获取最大整数值

   $getingstoredata=mysql_query('select number from number ');

   while ($getstd=mysql_fetch_row($getingstoredata)){

   print_r($getstd);
                                                    }

表格结构与这张图片相同http://fastcoding.tk/table.png

我想显示最高的整数值,例如 120 是此表中的最高值

最佳答案

使用 MAX()

SELECT MAX(number) FROM number

关于php - 如何从 mysql 表 PHP 中获取最大整数值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19834362/

相关文章:

php - Laravel orderBy 使用 2 个表?

php - php 中的网页的最佳执行时间是多少?

PHP 在 json 数组中搜索

php - 提交后弹出成功消息

PHP POST 验证错误删除所有条目

php - 成功登录后标题未重定向

php - 通过 wp_insert_post Wordpress 将 ı,ş,ç 等特殊字符保存到数据库中

sql - MySQL 查询浏览器 - 使用变量

mysql - 在组内排序?

c# - 如何设置两个连接字符串MySqlCommand对象参数?