update.php
$date = $_GET['datee'];
$qry = "INSERT INTO course_detail(userid, course_id, hours_complete, week_no, date) VALUES('$member_id','$fname','$hour','$week', '$date')";
$result = @mysql_query($qry);
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
可能和你的代码有关。插入时是否引用了日期字符串?
It's probably with your code. Have you quoted the date string when inserting?
这绝对不是 XAMPP 问题。我强烈建议您查看此链接有关日期时间的 MySQL 文档
MySQL Date 有固定的语法,通常遵循 YYYY-MM-DD 或 YYYYMMDD 的格式。我确信您正在使用 MySQL 上的表示层,例如 *.NET(ASP、winforms),您可以重新格式化 MySQL 生成的日期以匹配您的区域设置。以下是在 Microsoft 堆栈上执行此操作的方法MSDN 全球化分步,类似的方法适用于您可能使用的任何其他技术。
This is definitely not a XAMPP issue. I highly recommend you take a look at this link MySQL Documentation on Datetime
MySQL Date has a fixed syntax and it generally falls along the lines of YYYY-MM-DD or YYYYMMDD. I'm sure you're using a presentation layer over MySQL such as *.NET (ASP,winforms), you can reformat the date generated by MySQL to match your locale. Here's how you do it on the Microsoft stack MSDN Globalization Step-by-Step, similar methods are available for whatever else technology you may be using.