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
keep max value in a variable
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
You get it just like you get any other data from a MySQL SELECT query: mysql_fetch_row(), mysql_fetch_array(), mysql_fetch_assoc() or mysql_result().