I dont know what to put in my subject because I dont know how to categorize my question. I need people's suggestions on how will I do this...
I have managed to compare the current dates and expiration dates of records. When they fill up a form I have this expiration question thingy so there. I was able to store in my database if the product is still OK or not OK. I used the timestamps thingy to do compare current date and expiration date...( the strtotime() )...
but then how would the database know if it is still OK the next day? when someone created a profile for example it is not expired today (so it is flagged OK in the database) but tomorrow it will be expired (so it should be flagged "NOT OK").
how can I update the database?
PHP how to update database?
Moderator: General Moderators
-
php_postgresql
- Forum Newbie
- Posts: 13
- Joined: Sat Apr 19, 2008 9:37 am
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: PHP how to update database?
If you want the database to "automatically" update, then the only real way to do it would be to have a scheduled task (cron) on the server that performs the check and does the update. It looks like you have the code/sql how sussed, just seems you are wondering how you can do it without intervention?