Get data that are enter to the database in last 24 hours

Discussion in 'PHP' started by ghjk, Apr 1, 2008.

  1. #1
    I want to get data that are enter to the database in last 24 hours. This what i have done. But it is not working
    Could anyone help me?
     
    ghjk, Apr 1, 2008 IP
  2. mulari

    mulari Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to compare the date to a date field on your table.

    You should add (if you don't already have) a field to hold the date of the created row and then you can do something like that (assuming the field name is time_added):
     
    mulari, Apr 1, 2008 IP