Putting mathematical equations in MySQL.
Posted: Wed Apr 04, 2007 6:19 pm
Hello there.
Here's my problem.
Example. I've got a column called "stamina" and a column called "constitution", base stats, long story. Anyway, to get someone's HP, I do
Works well, everything's fine.
But what I would like to do is make it so columns could do that instantly for me anyway, and I wouldn't need to use a script to do it. That'd help organizational/effort issues greatly, actually, if it were possible.
And yes, I (like always!) attempted a google search, but I'm not even sure what exactly to search for. ;/
Edit: Eh, I'll just do it the old way. A bit messier, but it might even be easier on the server, I guess. ;(
Example. I've got a column called "stamina" and a column called "constitution", base stats, long story. Anyway, to get someone's HP, I do
Code: Select all
$hp = $themon['stam'] * 2 + ($themon['con'] * .4);But what I would like to do is make it so columns could do that instantly for me anyway, and I wouldn't need to use a script to do it. That'd help organizational/effort issues greatly, actually, if it were possible.
And yes, I (like always!) attempted a google search, but I'm not even sure what exactly to search for. ;/
Edit: Eh, I'll just do it the old way. A bit messier, but it might even be easier on the server, I guess. ;(