CURDATE()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am setting up a daily cron job to update the site map on my web site.  

I want to delete any records that weren’t updated by the cron job each day.  The way I can distinguish this is with the timestamp column named “last_record_update”  If a record wasn’t updated it is no longer part of the web site. 

I am trying to figure out if there is a way for me to use mysql’s date functions to query the records that are no longer part of the web site.

What I tried below doesn’t work:  ( CURDATE() . % )

The reason I wanted to use % is because the time will follow the date in a “timestamp” column

Is there a similar way to do what I am trying:

SELECT `reference` FROM `sitemap_pages` WHERE `last_record_update` NOT LIKE  ( CURDATE() . % ) ORDER BY `reference` +0

Thanks for helping.  

Ron

The Verse of the Day
“Encouragement from God’s Word”
http://www.TheVerseOfTheDay.info  

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux