Only add new information from XML to MySQL


Posted on 16th Feb 2014 07:03 pm by admin

What I am doing, is taking a xml file, and adding the values to a database. However, what I want to do is only add the new values.

I am guessing that a script that compared the first xx chars of the xml value to the value in the database would work best.

The script would be ran (in theory) once a day.

Example:

day1.xml
<fruits>
<fruit>apple</fruit>
<fruit>pear</fruit>
<fruit>orange</fruit>
</fruits>

day2.xml
<fruits>
<fruit>carrot</fruit>
<fruit>apple</fruit>
<fruit>pear</fruit>
<fruit>grape</fruit>
<fruit>orange</fruit>
</fruits>

Does anyone have any tips or code I could mooch off them?

No comments posted yet

Your Answer:

Login to answer
244 Like 36 Dislike
Previous forums Next forums
Other forums

Forum tutorial
Im a beginner in PHP. Im making a forum(previous questbook, counter and few others) to learn. For no

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

Getting Resource id #11 while trying to connect..
So i tried using "DEFINE" for the first time and im using the variables i defined to conne

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Export hangs
Hi all, please help

I have a Oracle 10.2.0.3.0 database. When I want to query the dba_segmen

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

php mysql script to find record
Hi,

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be pickin

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash