Solarpitch Posted February 20, 2008 Share Posted February 20, 2008 Hey, I am currently using this code to get a result through division... SELECT * FROM ratings WHERE total_votes > 0 ORDER BY (total_value / total_votes) DESC LIMIT 0, 5 this will display eg: 3.8888888888889 how can I round this off so it will show 3.9? Thanks Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 20, 2008 Share Posted February 20, 2008 http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_format Quote Link to comment 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.