var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: INSERT with NOT EXISTS
How to check if the input value to a table column already exist. I`m trying to use the phrase where not exists
but without success.
INSERT INTO TABLE (ID) VALUES ('1') WHERE NOT EXISTS ID=1;
Logically, the word is: 'IF' but there is no such query.
Thanks, but this query makes error from WHERE NOT EXISTS ...
Perhaps EXISTS subquery starts only with SELECT?
INSERT INTO TABLE (ID) VALUES ('1') WHERE NOT EXISTS (SELECT * FROM TABLE WHERE ID=1);
the answer is, you don't need to check if you've defined that column as unique
Originally Posted by duf
look up the INSERT ... ON DUPLICATE KEY syntax in da manual