Jump to content

Escape character being added to post data


LoneStarJack

Recommended Posts

I enter the following:

select nam_last from names where nam_last = 'cohn' into a form field

 

When I print it in the next program I get

select nam_last from names where nam_last = \'cohn\'

 

Which generates an error:

SELECT Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'cohn\'' at line 1

 

What causes the \ to be added into the field, and how do I stop it?

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.