Page 1 of 1

How do i rank my search result

Posted: Sun Jul 18, 2010 10:18 am
by adsegzy
Hello Friends,

I am building a website where the membership will be in 3 categories; class1, class2 & class3. each member in these 3 categories can add their products to my database to appear on my home page. I know how to display these added products on my home page but what i want to do is that i want the products being added by the class3 members to appear on top then follow by the products of class2 members and then products of class1 to come last. pls how do i do this.

regards,
adsegzy

Re: How do i rank my search result

Posted: Sun Jul 18, 2010 12:20 pm
by JakeJ
The answer to that question depends on how you are tracking who adds what? I will assume that you're displaying a product along with the member that added it. In order to display them in order of class, just add the class field of the member to your query and do "ORDER BY class DESC" so that the items are sorted by class in reverse order.