jintot Posted January 19, 2008 Share Posted January 19, 2008 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! Quote Link to comment Share on other sites More sharing options...
weasel2006 Posted January 19, 2008 Share Posted January 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
jintot Posted January 20, 2008 Author Share Posted January 20, 2008 hey dude! thanks for the idea.. maybe ill try to search for cron... maybe other experts may share other ideas regarding my question.. thanks!! cheers!! Quote Link to comment Share on other sites More sharing options...
jintot Posted January 20, 2008 Author Share Posted January 20, 2008 by the way, i'm using windows xp OS.. thanks!! Quote Link to comment Share on other sites More sharing options...
fenway Posted January 21, 2008 Share Posted January 21, 2008 Yes, a cron is likely the best way to go... otherwise, maybe the event scheduler in 5.1, but I haven't used it. Quote Link to comment Share on other sites More sharing options...
jintot Posted January 22, 2008 Author Share Posted January 22, 2008 i think cron is for unix like OS only? i have read something about it but the case is, im using windows xp.. what will be the tool that i might use? thanks!! Quote Link to comment Share on other sites More sharing options...
fenway Posted January 23, 2008 Share Posted January 23, 2008 i think cron is for unix like OS only? i have read something about it but the case is, im using windows xp.. what will be the tool that i might use? thanks!! There is an AT scheduler. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.