$tdate=strftime("%Y")."-".strftime("%m")."-".strftime("%d"); 
改成
$tdate=date("Y-m-d);

解决方案 »

  1.   

    应该是
    $tdate=date("Y-m-d");
    但是无效果
      

  2.   

    update download set lasthits=2002-10-01 where ID=3
    可以吗?反正我的 MYSQL 只支持:update download set lasthits="2002-10-01" where ID=3加上引号
      

  3.   

    是不是要插入当前时间
    用now()不行嘛?
      

  4.   

    $sql="update download set lasthits='$tdate' where ID=3"; 把那句改成上面的样子,要加上单引号。
      

  5.   

    谁还知道
    我看我数据库中的日期都是 yy-mm-dd-hh-mm-ss
    我只能用到yy-mm-dd,mysql中有没有这样的数据类型
      

  6.   

    在MYSQL中,有date和datetime兩種類型的數據,我看你用date類型的就可以啦!