Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    CBG
    CBG is offline
    New Coder
    Join Date
    Feb 2010
    Location
    UK
    Posts
    91
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Get results in the last 24 hours / 1 day?

    Hi,

    I would like to check results in the last 24 hours, I have my time/data score in the database as yyyy-mm-dd hh:mm:ss

    I was wondering what I would put to check the database and pull results in the last 24 hours/1 day.
    Regards,
    CBG

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,105
    Thanks
    23
    Thanked 594 Times in 593 Posts
    Try SELECT FROM `table_name` WHERE `time_created` < (NOW() - INTERVAL 24 HOUR)
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •