1064-您的SQL语法有错误 [英] 1064 - You have an error in your SQL syntax

查看:219
本文介绍了1064-您的SQL语法有错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的日期格式错误吗?


1064 - You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL 
server version for the right syntax to use near 
'%M-%y').', '.date('h:i:s a').', '3', '1', 'Title', 'Pr', 'BPM001')' at line 1

INSERT into names(com_id,rec_date,rec_time,rec_type,rec_request,rec_by,batch_id)
values('300','.date('%d-%M-%y').','.date('h:i:s a').','3', '1', 'Title', 'Pr', 'BPM001')

推荐答案

您可以尝试一下.

$ q =插入名称(com_id,rec_date,rec_time,rec_type,rec_request,rec_by,batch_id)值('300','".date(%d-%M-%y").",'".date(" h:i:sa)."','3','1','标题','Pr','BPM001');

$q= "INSERT into names(com_id,rec_date,rec_time,rec_type,rec_request,rec_by,batch_id) values('300', '".date("%d-%M-%y")."', '".date("h:i:s a")."', '3', '1', 'Title', 'Pr', 'BPM001')";

这篇关于1064-您的SQL语法有错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆