mreigle Posted February 17, 2006 Posted February 17, 2006 Why doesn't MySQL Like this? Is there a tool I can use to validate the strings before sending them to MySQL? : INSERT INTO `products_description` VALUES (2259, 1, '310TC Egyptian Cotton Sateen Olympic Queen (Fitted Sheet)', 'Do not miss this chance to own a brand new, incredibly luxurious, 100% super-soft Egyptian Cotton Olympic Queen (Fitted) sheet. You will not find a finer sheet at a better price, anywhere. Our 310 thread count Olympic Queen sheets have 16-inch (Deep) Pockets and are available in:<ul> <li>White<li>Sage<li>Aqua Blue<li>Berry<li>Yellow<li>Pink<li>Gold<li>Black<li>Claret</ul> <br> <br>These sheets are incredibly hard to find. Do not pay $130 for a 250 thread count set from the big bedding retail stores when you can get a 310 thread count Egyptian Cotton set from us at half of their price! Do not buy a whole sheet set if all you need is the (Fitted Sheet).This exceptionally luxurious sheet offers a feel that is smooth and inviting in a sleek, soft, satin-like fabric. <br> <br>Made of highest quality, 100-percent Egyptian cotton with a sateen weave, these linens feature impressively longwearing durability. The (Fitted Ssheets) have a fully elasticized edge all the way around and deep pockets. Designed with the pillowtop mattress of today in mind, they willstretch to fit those up to 16-inches thick.<br> <br>Reward yourself with this elegant, machine-washable sheet, at the lowest price available online!<br> <br>We have these custom-made specifically to fit the Simmons Olympic Queen Mattress.<br> <br> <ul> <b>Each pack includes:</b> <br> <br> <li>One (Fitted Sheet) </ul> <font color=blue>* Shipping costs will be calculated upon checkout using the Zip code of the buyer. We do not profit from shipping charges. This product may take up up to 7 days to ship and orders of multiple products may come from multiple locations.</font>'," '', 4200, " ", " ", " "); Here's the error I get from MYSQL: There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem ERROR: Unclosed quote @ 1789 STR: " SQL: INSERT INTO `products_description` VALUES (2259, 1, '310TC Egyptian Cotton Sateen Olympic Queen (Fitted Sheet)', 'Do not miss this chance to own a brand new, incredibly luxurious, 100% super-soft Egyptian Cotton Olympic Queen (Fitted) sheet. You will not find a finer sheet at a better price, anywhere. Our 310 thread count Olympic Queen sheets have 16-inch (Deep) Pockets and are available in:<ul> <li>White<li>Sage<li>Aqua Blue<li>Berry<li>Yellow<li>Pink<li>Gold<li>Black<li>Claret</ul> <br> <br>These sheets are incredibly hard to find. Do not pay $130 for a 250 thread count set from the big bedding retail stores when you can get a 310 thread count Egyptian Cotton set from us at half of their price! Do not buy a whole sheet set if all you need is the (Fitted Sheet).This exceptionally luxurious sheet offers a feel that is smooth and inviting in a sleek, soft, satin-like fabric. <br> <br>Made of highest quality, 100-percent Egyptian cotton with a sateen weave, these linens feature impressively longwearing durability. The (Fitted Ssheets) have a fully elasticized edge all the way around and deep pockets. Designed with the pillowtop mattress of today in mind, they willstretch to fit those up to 16-inches thick.<br> <br>Reward yourself with this elegant, machine-washable sheet, at the lowest price available online!<br> <br>We have these custom-made specifically to fit the Simmons Olympic Queen Mattress.<br> <br> <ul> <b>Each pack includes:</b> <br> <br> <li>One (Fitted Sheet) </ul> <font color=blue>* Shipping costs will be calculated upon checkout using the Zip code of the buyer. We do not profit from shipping charges. This product may take up up to 7 days to ship and orders of multiple products may come from multiple locations.</font>'," '', 4200, " ", " ", " "); SQL query: INSERT INTO `products_description` VALUES (2259, 1, '310TC Egyptian Cotton Sateen Olympic Queen (Fitted Sheet)', 'Do not miss this chance to own a brand new, incredibly luxurious, 100% super-soft Egyptian Cotton Olympic Queen (Fitted) sheet. You will not find a finer sheet at a better price, anywhere. Our 310 thread count Olympic Queen sheets have 16-inch (Deep) Pockets and are available in:<ul> <li>White<li>Sage<li>Aqua Blue<li>Berry<li>Yellow<li>Pink<li>Gold<li>Black<li>Claret</ul> <br> <br>These sheets are incredibly hard to find. Do not pay $130 for a 250 thread count set from the big bedding retail stores when you can get a 310 thread count Egyptian Cotton set from us at half of their price! Do not buy a whole sheet set if all you need is the (Fitted Sheet).This exceptionally luxurious sheet offers a feel that is smooth and inviting in a sleek, soft, satin-like fabric. <br> <br>Made of highest quality, 100-percent Egyptian cotton with a sateen weave, these linens feature impressively longwearing durability. The (Fitted Ssheets) have a fully elasticized edge all the way around and deep pockets. Designed with the pillowtop mattress of today in mind, they willstretch to fit those up to 16-inches thick.<br> <br>Reward yourself with this elegant, machine-washable sheet, at the lowest price available online!<br> <br>We have these custom-made specifically to fit the Simmons Olympic Queen Mattress.<br> <br> <ul> <b>Each pack includes:</b> <br> <br> <li>One (Fitted Sheet) </ul> <font color=blue>* Shipping costs will be calculated upon checkout using the Zip code of the buyer. We do not profit from shipping charges. This product may take up up to 7 days to ship and orders of multiple products may come from multiple locations.</font>'," '', 4200, " ", " ", " "); MySQL said: #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 '")' at line 1
mreigle Posted February 17, 2006 Author Posted February 17, 2006 I'm sure SOMEBODY has to know why MySQL is rejecting this...
moonstone Posted February 17, 2006 Posted February 17, 2006 For a start, you seem to have 9 values while the products_description table has only 6 fields. If you have not added more fields to the table then relook at your data. If the number of values corresponds to the number of fields, then try changing the double quotes for the last 3 and 5th values to single quotes. from multiple locations.</font>', '', 4200, '', '', ''); Hope that solves your problem... :blush:
mreigle Posted February 17, 2006 Author Posted February 17, 2006 For a start, you seem to have 9 values while the products_description table has only 6 fields. If you have not added more fields to the table then relook at your data. If the number of values corresponds to the number of fields, then try changing the double quotes for the last 3 and 5th values to single quotes. from multiple locations.</font>', '', 4200, '', '', ''); Hope that solves your problem... :blush: That did it. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.