Php 将curdate()设为参数
我想用curdate选择我的日期更新记录,我的日期更新记录具有时间戳数据类型。我想准确地按日期过滤,有人能帮我吗? 我在我的PHP程序和MySQL上尝试了这一点,但结果为空Php 将curdate()设为参数,php,mysql,sql,Php,Mysql,Sql,我想用curdate选择我的日期更新记录,我的日期更新记录具有时间戳数据类型。我想准确地按日期过滤,有人能帮我吗? 我在我的PHP程序和MySQL上尝试了这一点,但结果为空 选择*FROM goods WHERE date_update,如“%curdate%”以下是编写查询的正确方法: SELECT * FROM goods WHERE date_update >= curdate() and date_update < curdate() + interval 1 day; 使
选择*FROM goods WHERE date_update,如“%curdate%”以下是编写查询的正确方法:
SELECT *
FROM goods
WHERE date_update >= curdate() and date_update < curdate() + interval 1 day;
使用WHERE DATEdate\u update=curdate的任何isuue;如果更新日期包括time@Dagon . . . 查询不会使用索引进行筛选。
SELECT *
FROM goods
WHERE date_update = curdate();