Im trying to doing a sql query that is not working, I would like to add one element to a table only and only if that value is not in the table, something like that:
IF EXISTS (Select `id` from `artists` Where `artist`='"$artist"') Do Nothing
ELSE Insert into `artists` (`artist`) values('".$artist."')
What is the best way to do that?
PS: I have tried to look for that information by google and in the forum, but I dont understand the idea
Thank you very much in advance
PS2: Sorry, Its a MYSQL database