Jump to content

Problem with single quotes in mysql


mwouters

Recommended Posts

Hello,

When I insert a word in mySQL which contains a single quote, I escape it using addslashes($word);

When I do an export of my database I get this:

VALUES (2, 'kleuter', 'Gods\\'' dienst',

When I try to get it out of the database I don't get any results using:

SELECT * FROM `uitgaven` WHERE leermiddel='Gods\' dienst'

It looks like mysql escapes the \ and the quote seperately???

How can I get this to work?

Thanks a lot!

Mark.
Link to comment
https://forums.phpfreaks.com/topic/15146-problem-with-single-quotes-in-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.