4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: batu544 on July 05, 2010, 11:34:27 AM

Title: Getting 1 year back images
Post by: batu544 on July 05, 2010, 11:34:27 AM
Hi,
    Could anyone please let me  know how can I get the images which I have added one year back..??

I checked the image_date field but its a integer not a date and my knowledge in mysql is not so good.. :)

If image_date would be a date field and its in DB2 then the condition would be like this..

Code: [Select]
i.image_date < 1 YEAR 


It would be great, if someone can let me know the equivalent syntax of the above statement in mysql and for 4image..


Thanks,
batu544
Title: Re: Getting 1 year back images
Post by: V@nо on July 05, 2010, 11:49:35 AM
something like this:
$sql = "SELECT *
        FROM ".IMAGES_TABLE."
        WHERE image_date <= ".(time()-60*60*365);
Title: Re: Getting 1 year back images
Post by: batu544 on July 05, 2010, 03:07:45 PM
Thanks V@no.. I got the clue..  :)