Checking if an item in an array already exisit and if not insert into the table

I need help understanding why this is not working.

I have an array which is being correctly sent $_post and I can add the list no problems to a table, but what I want to do now is check if the items in that array already exist and if they don’t then Insert them into the table.

I figured it would be simple like this:

The database query conditions check to see if the array value exists and this appears to be working.

What I am finding is that if the first array item {{segment}} is checked does exist in the database it stops the whole repeat and I am not sure why it is doing this?

Something is wrong here and I am at a complete loss to understand why?

Anyone see what is wrong with my server connect?

Community Page
Last updated: