I am new to mySQL and is not sure where to start from.
I have a database of username, password, date of creation, active/inactive (1 and 0), name and etc...
I would like to know how I can add a field that involves with counting down the days.
Say for example the number is 30, which means the account will be valid for 30 days. Each day, the number will decrease by 1 automatically, to reflect the days passed.
If that number reaches 0, the active/inactive status will also change to 0, as in inactive. Otherwise, as long as the number is above 0, the status will be 1, so that the user can log in.
How and where should I start?
Thanks!!