Store HTML into MySQL database

后端 未结 4 621
慢半拍i
慢半拍i 2020-12-10 09:41

I\'m trying to store a String which contains HTML in a MySQL database using Longtext data type. But it always says \"You have an error in your SQL

4条回答
  •  感动是毒
    2020-12-10 10:23

    Try using mysql_real_escape_string function on the string you want to store. It is the easiest way.

提交回复
热议问题