get the max value of a column in sql table and use in php code example Example: php find the max in a table SELECT MAX(Price) AS LargestPrice FROM Products;