php日期方法归类

      让工作更简单 2006-3-3 16:47
用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

标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}