For example, the database uses the PHP (10-bit) timestamp to store the data of all-day posts on the date of the first post prior to the timestamp. How can I obtain the data? Table Name posts timestamp createdint (10) as the question
The database uses the PHP (10-bit) timestamp for Date Storage.
You want to request the full-day post data from the date of the first post before the timestamp according to the timestamp.
How can I obtain it?
Table Name posts
Timestamp created int (10)
Reply content:
Example
The database uses the PHP (10-bit) timestamp for Date Storage.
You want to request the full-day post data from the date of the first post before the timestamp according to the timestamp.
How can I obtain it?
Table Name posts
Timestamp created int (10)
SELECT @ d: = created FROM posts WHERE created <1234567890 order by created desc limit 0, 1; SELECT * FROM posts WHERE created <@ d AND created> = (@ d-@ d % (24*60*60 ));