Jump to content

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

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.