I have PHP array(array has multiple values) and i want to add that data in table but before insert into table check for value is exist in another table, if value get in another table skip that value.
Example:
INSERT INTO table1('column1','column2','column3') VALUES
('val11','val11','val11'),
('val12','val12','val12')
WHERE NOT EXIST
(SELECT * FROM table2 WHERE table2.column1 = VALUES(column1) AND
table2.column2 = VALUES(column2) AND table2.column3 = VALUES(column3)
Am I on the right path or is there a better way of doing this?
Thanks
Miten