phpmady Posted March 3, 2011 Share Posted March 3, 2011 Hi Guys, I have a table product where i want to list the top rated product, hope i get answer Table structure: product Product_ID Product_Name 1 xxx 2 yyy 3 zzz rating Rating_ID Product_ID Rating_Question1_Point Rating_Question2_Point 1 1 1 1 2 2 2 2 3 2 2 2 Required Result: 2 yyy(because Product 2 has total point 4) 1 xxx(because Product 1 has total point 2) 3 zzz(no points) Quote Link to comment https://forums.phpfreaks.com/topic/229518-order-by-high-ratings/ Share on other sites More sharing options...
Muddy_Funster Posted March 3, 2011 Share Posted March 3, 2011 You will need to explain how you are counting your rating's then, because I count "2 - yyyy" as having 8 points. Quote Link to comment https://forums.phpfreaks.com/topic/229518-order-by-high-ratings/#findComment-1182526 Share on other sites More sharing options...
phpmady Posted March 3, 2011 Author Share Posted March 3, 2011 You will need to explain how you are counting your rating's then, because I count "2 - yyyy" as having 8 points. shame of me, Yes you are right thats 8 point Thanks Quote Link to comment https://forums.phpfreaks.com/topic/229518-order-by-high-ratings/#findComment-1182585 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.