简体   繁体   English

如何从mysql databse php获取单个记录的时间戳?

[英]How to get the timestamp of individual records from mysql databse php?

Currently working with database and my client was confused with the db. 当前正在使用数据库,我的客户端与db混淆了。

I have a table with three columns named 我有一个名为三列的表

'fname' | 'lname' | 'email'
  • now i have inserted 50 records on 8 april 现在我在4月8日插入了50条记录
  • i have inserted 30 records and updated 10 record of 8 april on 9 april 我已插入30条记录,并于4月9日更新了4月8日的10条记录
  • i have inserted 20 records on 10 april 我在4月10日插入了20条记录

Now i want to fetch the records that were inserted or updated on particular date. 现在,我想获取在特定日期插入或更新的记录。

for example: i need a query such that i can fetch the records i play with on 9 april.(ie 30 inserted records and 10 updated records.). 例如:我需要一个查询,以便我可以获取4月9日播放的记录(即30条插入的记录和10条更新的记录)。 So i can fetch the 40 rows. 这样我就可以获取40行。

I'm not sure how to do this. 我不确定该怎么做。

Impossible to do. 不可能做。 You need two more columns with a datetime type to store the created date and the updated date 您还需要两列具有datetime类型的列来存储创建的日期和更新的日期

您需要在表中添加诸如create_dt之类的列,该列将在表中插入新行时存储当前日期

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM