I have a field called update (type: timestamp) in one of my tables. As you can probably guess from the name, it holds the date/time of the update
What i'd like to do, is when a user comes to a certain page, make a new update, but only if its after a certain time, xx:30:00 and xx:00:00 xx being any hours
Example:
User comes at 2009-04-22 22:59:44
check the database to see if there is a previous record.
There is - 2009-04-22 22:53:39
Since its not currently past 23:00:00 nothing happens
User comes back at 2009-04-22 23:00:01
check the database to see if there is a previous record.
There is - 2009-04-22 22:53:39
Its now past 23:00:00 so a new record is inserted with the new datetime
The checking the database for previous records and getting them isn't a problem. The bit i'm having trouble with is checking to see if the time now is greater than xx:00:00/xx:30:00 and if the database is less than xx:00:00/xx:30:00
can someone help with an example or something?