select top five products

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepjain
    Contributor
    • Jul 2007
    • 563

    select top five products

    Hii guys,
    I have a list of products in a table and there is a column called rating which is a value between 1-10 . i need to select top 5 rated products . is there any ways to do this in a single sql statement or any other method to do it .
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    Yea, you do a normal SELECT query, but add: "ORDER BY `rating` LIMIT 5"

    Comment

    Working...