Here’s the particular area im having an issue with
mysql_query("INSERT IGNORE INTO storeip (ip) VALUES ('$ip')");
when testing this it keeps adding the same entry to the table even though I have set IGNORE INTO.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It looks like you don’t have a
UNIQUE INDEXon the IP column. In order for INSERT IGNORE to work as required, that’s neccessary. Try this;To remove duplicates already, you can run this.