Jump to content

Find 30 days ago and INSERT....


timmylogue

Recommended Posts

I'm trying to search for passed dates (30 days ago) in my database and then INSERT 'expired' value into a column called 'trial_date_ended'.

 

The dates/passed dates are in a column field called "trial_date_started"

 

Here an example of what I thought would work but doesn't work: 

$sql="INSERT INTO users (trial_date_ended) VALUES  ('expired') < (NOW() - INTERVAL 30 DAY)";

 

 

Thanks for your help!

 

Tim

Link to comment
https://forums.phpfreaks.com/topic/295394-find-30-days-ago-and-insert/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.