[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SQL insert dupe prevention problem



I have a SQL problem....

INSERT INTO table (a, b, c, d, e, f)
VALUES (
"72fa545b9cc60c3b0af851c155128a9d", "a", "b", "c", 1158935640, "f"
)
IF NOT
EXISTS (
SELECT *
FROM table
WHERE (
table.a = "72fa545b9cc60c3b0af851c155128a9d"
)
) ;



what I'm doing wrong? I want to check table.a to prevent inserting
dupes...  it says...

#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 NOT EXISTS (SELECT * FROM rsstool_table WHERE (rsstool_table


THANKS!!!

Dirk



Reply to: