Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Apostrophe in some fields SQL saving issue 1.18.

Started by thedarksyde, January 28, 2014, 02:49:14 PM

Previous topic - Next topic

thedarksyde

Could not save a product with an Apostrophe in product description, Meta tag, Meta Description.

Here is the log...

2014-01-28 19:08:05 - database error:  AbanteCart core v.1.1.8 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 's World Of Color', '157', '1')' at line 1<br />Error No: 1064<br />INSERT INTO product_tags (`tag`, `product_id`, `language_id`) VALUES ('Walt Disney's World Of Color', '157', '1')  in <b>/home1/darksyde/public_html/core/database/mysql.php</b> on line <b>114</b>

2014-01-28 19:19:06 - database error:  AbanteCart core v.1.1.8 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 's Magical World Of Color', '159', '1')' at line 1<br />Error No: 1064<br />INSERT INTO product_tags (`tag`, `product_id`, `language_id`) VALUES ('Disney's Magical World Of Color', '159', '1')  in <b>/home1/darksyde/public_html/core/database/mysql.php</b> on line <b>114</b>

2014-01-28 19:21:47 - database error:  AbanteCart core v.1.1.8 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 's Magical World Of Color', '160', '1')' at line 1<br />Error No: 1064<br />INSERT INTO product_tags (`tag`, `product_id`, `language_id`) VALUES ('Disney's Magical World Of Color', '160', '1')  in <b>/home1/darksyde/public_html/core/database/mysql.php</b> on line <b>114</b>

gordontaylor

Yes, the php is seeing it as a tag and creating the error. Meta tags only need the text, extra characters are not indexed, same in the description.

abantecart

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

abolabo

#3
i suspect that mysql escape function does not works on your host.
Try  to ask hosting provider support about mysql_real_escape_string for your account ASAP. 
If it really does not work this is dangerous situation for you!
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

junkyard

they say meta tag keywords and meta descriptions do not matter much for the search engines today... so you could drop using these fields altogether

Forum Rules Code of conduct
AbanteCart.com 2010 -