best single quotation solution? Zencart

Please LogIn to Reply!

Post By: guest | 01-21-2013 07:57 Reply

Question




I have unavoidably had to add the category names to an existing table. However one of the names has ' in it which is causing a problem with the sql query. What is the best way to treat this as a regular character rather than attempt to effect the query??



_thanks






Answers




If I understand the question, the way to escape special characters is to place a backslash before them: Mary's Kitchen.









I was getting some data from one table and storing it into another and I found the addslashes() feature to work.



_thanks






Reply Or Comment!
Please LogIn to Reply!