Hey all i am working on a database project for a class (im just learning sql)
What i am doing successfully
1: Reading an event XML feed from another website and placing it into the database (via php)
(internal id is controlled by me and needed externalinstance_id is pulled from the feed and i want it to insert if not exists)
http://i.imgur.com/rKrRBQ8g.png
what am i trying to do?
1: The events have their own eventinstance_id (i want to use this to insert only unique) , and i Have my own Internal ID, how do i "insert if external_id is not in the database" (ignore duplicated)
what i tried so far:
1: A select where not exists in phpmyadmin(trying to build the query) however when i perform the query i get this error on phpmyadmin
*different table same idea (my testing table)
http://i.imgur.com/unkURL5.png
(i want to insert iff there isnt a internal_id of 2 for example... (same project different table same idea of what i need to do) )
Server
Win 7 (i know)
Apache 2.4.18
PHP 7.0.6
PHP EXT mysqli
phpmyadmin 4.5.1
Thanks in advanced (may or may not be a stupid question)