$insertSQL = sprintf("INSERT INTO new_user(RegTime) VALUES ('%s')",time());
$Result1 = mysql_query($insertSQL, $connmessage) or die(mysql_error());
mysql的RegTime类型是time,
但是无法写入,提示格式不对,怎么办?
$insertSQL = "INSERT INTO `new_user` ( `RegTime` ) VALUES ('".time()."')";
$Result1 = mysql_query($insertSQL, $connmessage) or die(mysql_error());
$Result1 = mysql_query($insertSQL, $connmessage) or die(mysql_error());
温馨提示:答案为网友推荐,仅供参考