为什么这个正确转义的SQL查询失败了?

这是查询:

INSERT INTO jobemails (jobid, to, subject, message, headers, datesent) VALUES ('340', 'jrhodes@jhu.edu', 'We\'ve received your request for a photo shoot called \'another\'.', 'message', 'headers', '2010-04-22 15:55:06')

数据类型都是正确的,它总是在主题上失败,所以它必须是我如何逃避值,我假设.

我相信你们中的一个人会马上看到我的白痴错误.一点帮助?

解决方法:

SQL从行到函数混淆了’to’.

尝试:

INSERT INTO `jobemails` (`jobid`, `to`, `subject`, `message`, `headers`, `datesent`) VALUES ('340', 'jrhodes@jhu.edu', 'We\'ve received your request for a photo shoot called \'another\'.', 'message', 'headers', '2010-04-22 15:55:06')
上一篇:linux – 用于FTP登录的wget中的Escape @


下一篇:c# – 如何在剃须刀foreach中使用html和escape razor?