用DATE函数得到了今天的日期,
在通过这个日期得到昨天的、前天的日期,该怎么实现?
$ aa=mktime(0,0,0,date("m"),date("d")-1,date("Y"));echo date("Y-m-d",$ aa);
ACCESS这么写:sql="select * from ip where username Like '"& user &"' and fdata>=#"&date()-7&"# and fdata<=#"&date()&"# order by id desc
那么SQL应该怎么写呢?
--------------------------------------------------------------------------------
sql="select * from ip where username Like '"& user &"' and fdata>='"&date()-7&"' and fdata<='"&date()&"' order by id desc
在通过这个日期得到昨天的、前天的日期,该怎么实现?
$ aa=mktime(0,0,0,date("m"),date("d")-1,date("Y"));echo date("Y-m-d",$ aa);
ACCESS这么写:sql="select * from ip where username Like '"& user &"' and fdata>=#"&date()-7&"# and fdata<=#"&date()&"# order by id desc
那么SQL应该怎么写呢?
--------------------------------------------------------------------------------
sql="select * from ip where username Like '"& user &"' and fdata>='"&date()-7&"' and fdata<='"&date()&"' order by id desc
回复Comments
作者:
{commentrecontent}