I am trying to insert into a mysql DB a row only if the a certain field in the DB does not match the one i'm inserting.
For example i have a table
Address, name, Date
And i am inserting these values
Asd@Asd.com, John, 2002-03-02
I want to check if the Address is already in the DB and if it is, do not insert this row.
Is it possible to do this with a Single Insert statement?
I tried this but it doesnt work
$Sql = "INSERT INTO tblEmailInfo (EmailAddress, Active) VALUES ('$EmailAddys[$Counter]','TRUE') WHERE EmailAddress != '$EmailAddys[$Counter]' ";
Thanks!😃