I have a database with the following columns:
CurrentCredits, CreditsPerDate, RefillDate, RefillFrequency, RefillDayMonth
I'd like to make it automatically update the CreditsPerDate and RefillDate depending on the frequency selected.
For example,
if RefillFrequency = 5 and RefillDayMonth = "day" and CreditsPerMonth = 2
I want it to update CurrentCredits and RefillDate every 5 days such that 
CurrentCredits = CurrentCredits + CreditsPerMonth and 
RefillDate = RefillDate + the frequency date (here add 5 days)
 
     
     
    