Encasing "\" In PHP With MySQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
WanamakerStudios
Forum Commoner
Posts: 65
Joined: Thu Nov 30, 2006 7:35 am

Encasing "\" In PHP With MySQL

Post by WanamakerStudios »

Good Morning! I hope someone might be able to help me out with this. We receive a database feed from a third party company. In parts of their database, they have product codes that contain "\". Whenever I try to display or search on a product based on a product code that contains that character, my program quits. Is there a way to encase that "\" so I can search and display on that field?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

You may want to take a look at mysql_real_escape_string()
Post Reply