abhikerl Posted June 11, 2008 Share Posted June 11, 2008 Does anyone knows how to do a rating system. In fact, I have already build it but I don't know how to merge it with the articles that have to rated. Each article should have a unique rate. It's like on youtube. If any one knows how to do it or can give a few advice. I'll be grateful.thanks in advance. http://www.islandinfo.mu Quote Link to comment https://forums.phpfreaks.com/topic/109716-rating-star/ Share on other sites More sharing options...
MadTechie Posted June 11, 2008 Share Posted June 11, 2008 So.. whats the problem with the one you wrote.. surely your just need to add the article id to the ratign system.. (depends how you wrote it i guess), i think we need more info Quote Link to comment https://forums.phpfreaks.com/topic/109716-rating-star/#findComment-562996 Share on other sites More sharing options...
conker87 Posted June 11, 2008 Share Posted June 11, 2008 Create a table called 'ratings' id, articleID, rating Get all the rows that = to the article id of your chosen article. Then use the AVG() function to average out the ratings and echo out the outputted number. You may want to round it to 2dp though. Quote Link to comment https://forums.phpfreaks.com/topic/109716-rating-star/#findComment-563025 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.