SQL Insert IP if Not exist
Posted: 03 Apr 2018, 10:24
My next problem... I want to insert into my data-base & detect if the record allready exists
when the record allready exists i don`t want to insert a new record
I looking for some hours for a solution but can`t find any
(This SQL example is not working) What must I do ?
when the record allready exists i don`t want to insert a new record
I looking for some hours for a solution but can`t find any
(This SQL example is not working) What must I do ?
Code: Select all
mysqli_query($con," INSERT INTO ip_register (ip_adress,country,date)
VALUES ('$ip','$details->country','$today')
SELECT * FROM ip_register WHERE NOT ip_adress='$ip'
");