Спешить... Можете ли вы помочь мне найти решение для данной проблемы
<pre>INSERT INTO `coffee` (`id`, `name`, `type`, `price`, `roast`, `country`, `image`, `review`) VALUES (1, 'Cafe au Lait', 'Classic', 2.25, 'Medium', 'France', 'Images/Cafe-Au-Lait.jpg', 'A coffee beverage consisting strong or bold coffee (sometimes espresso) mixed with scalded milk '), (2, 'Caffe Americano', 'Espresso', 3.25, 'Medium', 'Italy', 'Images/caffe_americano.jpg', 'Similar in strength and taste to American-style brewed coffee, there are subtle differences achieved by pulling a fresh shot of espresso for the beverage base.'), (3, 'Peppermint White Chocolate Mocha', 'Espresso', 3.25, 'Medium', 'Italy', 'Images/white-chocolate-peppermint-mocha.jpg', 'Espresso with white chocolate and peppermint flavored syrups and steamed milk. Topped with sweetened whipped cream and dark chocolate curls.'), (4, 'Galao', 'Latte', 4.2, 'Light', 'Portugal', 'Images/galao_kaffee_portugal.jpg', 'Galao is a hot drink from Portugal made of espresso and foamed milk') MySQL said: Documentation #1062 - Duplicate entry '1' for key 'PRIMARY'
Что я уже пробовал:
INSERT INTO `coffee` (`id`, `name`, `type`, `price`, `roast`, `country`, `image`, `review`) VALUES (1, 'Cafe au Lait', 'Classic', 2.25, 'Medium', 'France', 'Images/Cafe-Au-Lait.jpg', 'A coffee beverage consisting strong or bold coffee (sometimes espresso) mixed with scalded milk '), (2, 'Caffe Americano', 'Espresso', 3.25, 'Medium', 'Italy', 'Images/caffe_americano.jpg', 'Similar in strength and taste to American-style brewed coffee, there are subtle differences achieved by pulling a fresh shot of espresso for the beverage base.'), (3, 'Peppermint White Chocolate Mocha', 'Espresso', 3.25, 'Medium', 'Italy', 'Images/white-chocolate-peppermint-mocha.jpg', 'Espresso with white chocolate and peppermint flavored syrups and steamed milk. Topped with sweetened whipped cream and dark chocolate curls.'), (4, 'Galao', 'Latte', 4.2, 'Light', 'Portugal', 'Images/galao_kaffee_portugal.jpg', 'Galao is a hot drink from Portugal made of espresso and foamed milk');
ZurdoDev
Это означает, что у вас уже есть запись со значением 1 в первичном ключе.