Welcome Guest, Not a member yet? Register   Sign In
how to clear a field in database in x mins?
#2

You could put 'expiry' date/time set +1 hour in future in DB and when checking code check against it.

Because it's such a limited use feature and because there's time limit on after which you don't have to worry about extra codes being stored in DB, you could run clean-up script once a day or once a month even.

It's usually done via CRON job on server side, that calls php /pahttoyourproject/index.php cron/cleanup from command line.

Just make sure you check that such controllers are only called from command line, think the helper function for that in CI was is_cli().
Reply


Messages In This Thread
RE: how to clear a field in database in x mins? - by Pertti - 07-13-2018, 08:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB