![]() |
Quote mayhem
In the text of a product description if I have double quotes on something like this:
"Me" It works fine but if there is an apostraphe(single quote) like this within the doubles: "I'm Me" I get errors. INVALID SQL: 1064 : 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 ' magic_quotes_gpc is enabled so what could cause this? |
Actually any single quote in description text ' gets an error.
Anybody have an idea of what is causing this please. |
Bad coding.
I don't know if magic_quotes_gpc covers single quotes as well as double. But, it cannot be set at run time (if that's how you're doing it), and it will be overriden by magic_quotes_sybase. The easiest way is just to fix every instance you stumble across of bad SQL by manually adding "addslashes()" around variables before the query is run. |
Thanks kpayne :)
Now how am I supposed to go through every php page to "fix" X-Cart's code? uuuuggggghhhh The strange thing is this doesn't happen on an install I have of 3.3.3 but it does on my install of 3.4.3 on the same server so they broke it somehow :roll: |
All times are GMT -8. The time now is 02:43 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.