what is the error message?

解决方案 »

  1.   

    还有 now() 这种类型与数据库中的字段能对应上嘛?
      

  2.   

    一般往MYSQL里写日期时都用这样的格式: '1986-9-4' 就行.你再好好想想吧.
      

  3.   

    不要在语句里面直接用函数now(),和其它一样用一个变量引入.
      

  4.   

    看一下错误信息吧
    $query_result=mysql_query($query) or die(mysql_error());
      

  5.   

    对啊,直接用函数now()不好吧,最好把时间付给一个变量
      

  6.   

    时间类型入库前必须是字符形式,你最好转化一下:
    "'" & nows() & "'"改好的程序如下:
    query="insert into download(id,classid,name,size,language,sort,enviroment,date,downtimes,linkpeople,author,memo) values ('','$classid11','$softname','$size','$language','$sort','$enviroment','" & now() & "','','$linkpeople','$author','$memo')";
      

  7.   

    to: lza7(浪子阿七) 
    I just doubt have you ever used INSERT in SQL before. 
    try to run this in your SQL editer, and compare:
    SELECT 'now()';    /*return now()*/
    SELECT now();     /*return 4.8.2004 16:46:35*/
      

  8.   

    now() is just a simple easy-using SQL function which is less likely to cause any errors when the program is careful enough. Since none of us see the error message yet, there are too many reasons to cause the "INSERT" errors, so please don't draw a conclusion so fast. to dingzhanxing (wo) :
    try to filter your post parameters with: "htmlentities($str, ENT_QUOTES); " before the INSERT process
      

  9.   

    可能是字段类型的问题,
    now()??
    建议用$date = date("20y-m-d H:i:s");
    你应该要学会自己调试,把这个语句的执行结果打印出来放到mysql里面去调试!!
      

  10.   

    1、执行
    mysql_query($query) or die(mysql_error());
    查看出错原因
    2、贴出表结构