scusate mi sapete dire cosa c'è di sbagliato in questa query?
mi da un errore di sintassi! Grazie
codice:
IF (EXISTS (SELECT * FROM immagine WHERE IMMAGINE_file = '344-17-33-40-img_3286_123.jpg')) begin UPDATE immagine SET GALLERIA_id, IMMAGINE_file, IMMAGINE_posizio WHERE ord_num = '344-17-33-40-img_3286_123.jpg' end else begin INSERT INTO immagine (GALLERIA_id, IMMAGINE_file, IMMAGINE_posizione) VALUES ('', '344-17-33-40-img_3286_123.jpg', '0')
codice:
#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 'IF (EXISTS (SELECT * FROM immagine WHERE IMMAGINE_file = '344-17-33-40-img_3286_' at line 1