Jump to content

order by high ratings


phpmady

Recommended Posts

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)

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/229518-order-by-high-ratings/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.