Reputation: 421
I was wondering how insert now() + 3 days into a mysql insert.
kinda like this mysql_query(INSERT INTO what_ever ('','',now(), now() + 3 days)
Ignore if this code doesn't work it just and example.
I was wondering how I can do this. I want to add an expiration time so when users log in and its on that date or past it will automatically remove the item. I don't need help removing I just need help adding it the date to the now function.
Upvotes: 2
Views: 2200
Reputation: 3297
INSERT INTO what_ever ('', '', now(), DATE_ADD(NOW(), INTERVAL 3 DAY));
Upvotes: 3