keep max value in a variable
Posted: Thu Dec 14, 2006 9:41 am
hi there...i want to keep the max value of a table (lets say for price column) on a variable on php, in order to call [s]smth[/s]something like this
mysql_querry (select * from '$table' where price between $pricemin and $pricemax); (pricemin is not the min of the table,its defined in other way)
How can i have on $pricemax the max value of a certain field of a certain table..
I know how to get it using
SELECT max( price ) FROM `table` but i dont know how to get that on a variable.
Thanks for any help
mysql_querry (select * from '$table' where price between $pricemin and $pricemax); (pricemin is not the min of the table,its defined in other way)
How can i have on $pricemax the max value of a certain field of a certain table..
I know how to get it using
SELECT max( price ) FROM `table` but i dont know how to get that on a variable.
Thanks for any help