| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
#1
|
|||||||
|
|||||||
![]() 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? |
|||||||
#2
|
|||||||
|
|||||||
![]() Actually any single quote in description text ' gets an error.
Anybody have an idea of what is causing this please. |
|||||||
#3
|
|||||||||
|
|||||||||
![]() 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.
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want. |
|||||||||
#4
|
|||||||
|
|||||||
![]() 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 ![]() |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|