MySQL Forums
Forum List  »  Newbie

Re: Using MAX() or MIN()
Posted by: Jay Pipes
Date: June 20, 2005 10:56AM

You don't need PHP, use user variables.

SELECT @max_popularity:= MAX(mov_popularity) FROM table;
SELECT mov_name FROM table WHERE mov_popularity = @max_popularity;

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Written By
Posted
June 18, 2005 03:00PM
June 18, 2005 06:00PM
June 20, 2005 04:55AM
June 20, 2005 10:17AM
Re: Using MAX() or MIN()
June 20, 2005 10:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.