在php中将数据插入数据库

时间:2014-03-26 15:19:43

标签: php

Helo亲爱的朋友们。在插入包含cotes(",')的数据到我的数据库时,我有问题。插入在第一个"找到我的字符串。

我的查询是

"INSERT INTO table(Id,message,Date) VALUES(1,"here is come text

",?) "

1 个答案:

答案 0 :(得分:2)

请务必使用单引号

"INSERT INTO table (Id, message, Date) VALUES (1, 'here is come text', ?)"