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*/
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
$query_result=mysql_query($query) or die(mysql_error());
"'" & 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')";
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*/
try to filter your post parameters with: "htmlentities($str, ENT_QUOTES); " before the INSERT process
now()??
建议用$date = date("20y-m-d H:i:s");
你应该要学会自己调试,把这个语句的执行结果打印出来放到mysql里面去调试!!
mysql_query($query) or die(mysql_error());
查看出错原因
2、贴出表结构