jwk811 Posted February 16, 2007 Share Posted February 16, 2007 $sql = "SELECT max(size) FROM products"; $result = dbQuery($sql); $row = mysql_fetch_assoc($result); extract($row); $size isnt an option? how can I get the number of the max size? (functions are fine, just simplified) Quote Link to comment Share on other sites More sharing options...
utexas_pjm Posted February 16, 2007 Share Posted February 16, 2007 $sql = "SELECT max(size) FROM products"; $result = dbQuery($sql); $row = mysql_fetch_assoc($result); extract($row); $size isnt an option? how can I get the number of the max size? (functions are fine, just simplified) SELECT max(size) AS max_size FROM products Now use max_size as the col name. Best, Patrick Quote Link to comment Share on other sites More sharing options...
jwk811 Posted February 16, 2007 Author Share Posted February 16, 2007 aww i remember that now.. thanks! Quote Link to comment Share on other sites More sharing options...
btherl Posted February 16, 2007 Share Posted February 16, 2007 max(size) on its own will give you a column named "max". But I always use AS with aggregates. Makes things neater Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.