Author Topic: Getting 1 year back images  (Read 2796 times)

0 Members and 1 Guest are viewing this topic.

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Getting 1 year back images
« 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

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: Getting 1 year back images
« Reply #1 on: July 05, 2010, 11:49:35 AM »
something like this:
$sql "SELECT *
        FROM "
.IMAGES_TABLE."
        WHERE image_date <= "
.(time()-60*60*365);
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: Getting 1 year back images
« Reply #2 on: July 05, 2010, 03:07:45 PM »
Thanks V@no.. I got the clue..  :)