ram4nd Posted July 29, 2009 Share Posted July 29, 2009 I have 2 columns votes_added and votes_total, by dividing votes_added with votes total i get my result. But i would like to order my data by rating with these columns, i believe that its possible with query, i hoe i don't have to do that by getting all that data to array order them and then get the data in right order from sql table by id. Quote Link to comment https://forums.phpfreaks.com/topic/168016-order-by-rating/ Share on other sites More sharing options...
abazoskib Posted July 29, 2009 Share Posted July 29, 2009 use something like select (votes_added/votes_total) as result ORDER BY result Quote Link to comment https://forums.phpfreaks.com/topic/168016-order-by-rating/#findComment-886197 Share on other sites More sharing options...
ram4nd Posted July 29, 2009 Author Share Posted July 29, 2009 Can anybody give me more precise answer please Quote Link to comment https://forums.phpfreaks.com/topic/168016-order-by-rating/#findComment-886213 Share on other sites More sharing options...
fenway Posted August 3, 2009 Share Posted August 3, 2009 Can anybody give me more precise answer please That's basically it... did you try it? Quote Link to comment https://forums.phpfreaks.com/topic/168016-order-by-rating/#findComment-889953 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.