我一生无法弄清这里的问题所在,也许另一双眼睛可能会有所帮助:

这是错误消息:

Error Number: 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 '://www.amazon.com/Lemon-Recipes-Alkalizing-Addition-Delectable-ebook/dp/B00CZTCS' at line 1

INSERT INTO `books` (`asin`, `keyword_id`, `page_count`, `sales_rank`, `price`, `link`) VALUES (B00CZTCS9K, 1, 77, 96317, 2.25, http://www.amazon.com/Lemon-Recipes-Alkalizing-Addition-Delectable-ebook/dp/B00CZTCS9K%3FSubscriptionId%3DAKIAJPNAWJHXGB5IYXOA%26tag%3Dgenroad-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00CZTCS9K)

最佳答案

正如M Khalid Junaid提到的那样,您需要将字符串用单引号引起来。
这意味着'B00CZTCS9K'和链接'http://....'应该都被包装。

其余的看起来像小数,但是,如果还有其他值是一个字符串(varchar),那么也要包装它。

10-07 21:45