Jump to content

Can mysql values be set as (value1 * value2)


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.