用PHP,在MYSQL数据库中如何查找当天的数据
我向数据库中插入数据的SQL语句为:
insert into eat (name,cg,eat,tel,datetime) values ('$name','$cg','$eat','$tel',NOW())
其中datetime在数据库中的格式为:"2006-11-16 12:39:28"
我如何只查找当天的数据
select * from eat where datetime????
谢谢!
表的创建语句如下:
CREATE TABLE eat(
name char(40),
cg char(40) ,
eat char(40) ,
tel int(8),
datetime char(40)
);