Jump to content

Recommended Posts

I kind've need the help quickly....

Umm, you're getting free help from a public community, which members donate their free time to help.

 

Also in order to get you a faster reply would help if you posted your current query and posting your question within the correct board. PHP help is for PHP. Yours is related to MySQL (I presume) so I'll move this tread.

Link to comment
https://forums.phpfreaks.com/topic/97467-sorting-help/#findComment-498767
Share on other sites

I have a table sites that has the cols id, title, description, uid. I also have a table rating with the rows sid, uid, rating. sid reffers to the site. Now I want to sort 'sites' by the average of all of the ratings reffering to that site. This is a want I would do if I could (obviously not legal:

SELECT * FROM sites ORDER BY AVG(SELECT rating FROM rating WHERE sid = '".$sid."') DESC

.

 

Clear?

Link to comment
https://forums.phpfreaks.com/topic/97467-sorting-help/#findComment-498781
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.