how to get highest integer value from mysql table PHP
$getingstoredata=mysql_query('select number from number ');
while ($getstd=mysql_fetch_row($getingstoredata)){
print_r($getstd);
}
and table stricture is same like this image http://fastcoding.tk/table.png
i want to display highest integer value for example it 120 is highest value in this table
use MAX()
SELECT MAX(number) FROM number
You can simply use the Aggregate Functions. SELECT MAX(field_name) FROM table_name GROUP BY field_name;
You can also use "order by" clause with DESC and fetch the first row from result-set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With