我有一个查询
SELECT IF((select COUNT(*) from produkty where name='ASROCK 760GM-GS3' and id_nokaut='7507601876693181035' and found ='0')=0, (insert into produkty (
id_nokaut,
name,
shop_count,
offer_count,
price_min,
price_max,
price_avg,
url,
opis,
socket,
typ_pamieci,
co,
image_mini,
image_medium,
image_large,
rate,
thumbnail,
image,
found)
values(
'7507601876693181035',
'ASROCK 760GM-GS3',
'4',
'4',
'171,31',
'195,00',
'179,88',
'http://www.nokaut.pl/plyty-glowne/asrock-760gm-gs3.html',
'ASRock 760GM-GS3... ',
'false',
'false',
'plyta',
'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc90x90/asrock-760gm-gs3.jpg',
'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc130x130/asrock-760gm-gs3.jpg',
'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc500x500/asrock-760gm-gs3.jpg',
'0.00',
'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc90x90/asrock-760gm-gs3.jpg',
'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc130x130/asrock-760gm-gs3.jpg',
'1')), (update produkty set id_nokaut = '7507601876693181035', shop_count = '4', offer_count = '4', price_min = '171,31', price_max = '195,00', price_avg = '179,88', url = 'http://www.nokaut.pl/plyty-glowne/asrock-760gm-gs3.html', opis = 'ASRock 760GM-GS3... ', socket = 'false', typ_pamieci = 'false', co = 'plyta', image_mini = 'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc90x90/asrock-760gm-gs3.jpg', image_medium = 'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc130x130/asrock-760gm-gs3.jpg', image_large = 'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc500x500/asrock-760gm-gs3.jpg', rate = '0.00', thumbnail = 'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc90x90/asrock-760gm-gs3.jpg', image = 'http://nokautimg1.pl/p-da-99-da99e9e7b3eaebef049d1234fc5c15dc130x130/asrock-760gm-gs3.jpg', found = '1' where name = 'ASROCK 760GM-GS3'));
我正在尝试在 MySQL 中执行它,但它给出了 mi 错误:
第 4 行的 ERROR 1064 (42000):您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以获取正确的语法,以便在第 1 行的“into produkty (id_nokaut, name, shop_cou') 中使用
我不知道出了什么问题,有人可以帮忙吗?
谢谢