MySQL not allowing apostrophe

Status
Not open for further replies.

usprfc

New Member
Messages
11
Reaction score
0
Points
0
Hi there,

I'm having problems inserting or updating text with an apostrophe ( ' ) into MySQL.

Why is this, and is there a way I can allow it?

Cheers
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Escape it with a back-slash, \

That should fix the problem. How are you running the queries? PHP?
 

usprfc

New Member
Messages
11
Reaction score
0
Points
0
Thanks Bryon, that has sorted it.

Yep I'm using PHP. I'm running a local copy and a live copy of the site. Locally it is fine, so I'm guessing the problem is to do with a difference of the PHP configuration.

Thanks, jim
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
You're welcome. If you have any other questions, re-open this thread or create a new one.
 
Status
Not open for further replies.
Top