Jump to content

Can mysql values be set as (value1 * value2)


seany123

Recommended Posts

Basically what im wanting to do is have a value in my table be equal to whatever value1 + value2 is.. or whatever values and formula i need. can this be done without using php?

 

So im wanting it a bit like excel... once eg value1 changes, so does the total value.

 

can it be done?

scroll down in this article (better if your read it completely) and look for "Third Normal Form"

http://www.deeptraining.com/litwin/dbdesign/FundamentalsOfRelationalDatabaseDesign.aspx

 

what you asked can be done... yes... should be done: no (bad design)... all the calculated values should be obtained in execution time, no stored in the DB

scroll down in this article (better if your read it completely) and look for "Third Normal Form"

http://www.deeptraining.com/litwin/dbdesign/FundamentalsOfRelationalDatabaseDesign.aspx

 

what you asked can be done... yes... should be done: no (bad design)... all the calculated values should be obtained in execution time, no stored in the DB

 

Okay thankyou ill be taking a look!

 

hmm, the reason im asking for this is because im setting up a Stock exchange simulator/game and there are so many things that need updating when just a small execution is done. i was thinking that if it was already written inside mysql to update/change the values then it would be easier.

 

Seany

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.