I will try to make this question as clear as I can but bare in mind that English is not my first language. I have a web application written in PHP using a MySQL database. In a table I might have thousands of entries and in each entry I am storing this data:
$hourly_rate,
$minutes
when I process my table through a loop, I calculate the net value using the following formula:
$net_value = $minutes*($hourly_rate/60);
now the question, should I instead add a $net_value field on my table, calculate the net value on the client side using JQUERY and then upload the result of the calculation in the $net_value field? Which one do you think is the best approach considering I might have 1000 users accessing the system at the same time?
Thank you for you help,
Donato
Generally I wouldn’t store such simple calculated values in the database. Doing that calculation in PHP takes so little time that it isn’t even worth thinking about.