forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: johnner on January 04, 2006, 07:12:43 pm

Title: Getting last date uploaded on page outside Coppermine
Post by: johnner on January 04, 2006, 07:12:43 pm
Is there anyway to just get the date that the last image was uploaded?  I would like to include a link on my main page that says Images last uploaded x/xx/xxxx, and then a link to the latest uploads.  Any info would be greatly appreciated.
Title: Re: Getting last date uploaded on page outside Coppermine
Post by: Nibbler on January 04, 2006, 07:21:29 pm
Run a mysql query to get the ctime of the pic with the highest pid.

Code: [Select]
SELECT ctime FROM prefix_pictures ORDER BY pid DESC LIMIT 1
That will give you the unix timestamp for the latest addition which you can format as you like using date().