Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
11-14-2011, 03:19 PM #1
- Join Date
- Nov 2011
- Thanked 0 Times in 0 Posts
mysql interfacing with website Math
I am working on a site through godaddy since I have no coding background.
I have a mysql database through them, and it puts onto the website 4 columns.
First column is text for various criteria, the second column is Weight (would be percentages between 0 and 100, and the whole column would have to add up to 100%). The third column is a rating from 0 to 10. The fourth column would take columns 2 and 3 and multiply them together, and the sum of all those criteria should be at the bottom.
How do I do the mathematical computations?
Also, after a user hits "submit" to post his/her weights and ratings, how would I have the summed total of all the multiplications show up on the page? Is there a way to do that solely in the PHP section along with the mysql?
The criteria would be fixed (same for all users) but what they rate and weight would be inputted by them.