datetimepicker访问冲突错误

时间:2016-06-27 01:58:57

标签: php

datatimepicker工作正常,但无法将date.time插入数据库, 总是得到语法错误或访问冲突:1064错误。 "请注意,datetimepicker格式与此06-27-2016 12:00 AM类似。"

<div class='input-group date' id='datetimepicker1'>
             <input type='text' class="form-control" id="datepicker" name="datepicker"/>
             <span class="input-group-addon">
             <span class="glyphicon glyphicon-calendar"></span>
             </span>
         </div>

查询

$sql = "INSERT INTO news(`newsdate`,`title`)VALUES (".$_POST["datepicker"]."',".$_POST["title"]."')";

0 个答案:

没有答案