Jump to content

I need info


jintot

Recommended Posts

is it possible that mysql update the record automatically in such time?

 

for example,

 

|    balance  |    maturity_date        |

------------------------------------

|  12000      | 2008-02-19 20:00:00 |

 

 

if the maturity that date comes, the balance increase by 6% automatically..

 

i dont have any query on it because i don't know if it is possible..

 

thanks! 

Link to comment
https://forums.phpfreaks.com/topic/86795-i-need-info/
Share on other sites

Hi there,

 

I'm only a beginner myself but maybe something like this could be done with cron?

Have the cron call and run a script that goes through the database and finds the column with the values you want increasing and have the script run an equasion to add X% to whatever it finds in each field in that column and returns the new value to the field, processing each field / cell in that column in turn.

Then have the script run by cron once every 24 hours maybe?

 

Of course the script would need some way of telling what had matured and what hadn't!

 

As I say, I'm a noob and there is probably a better and more efficient way to do this.

 

If it's not feesable it was a good idea lol

 

Just trying to help  ;D

Link to comment
https://forums.phpfreaks.com/topic/86795-i-need-info/#findComment-443625
Share on other sites

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.