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

CE 7.1 and External GIS integration
Hi All,

We want to develop an application on CE 7.1 which uses GIS features from an exter

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but

help need on ob_start()
Hi

I am a newbie in php, I have a code
Line number On/Off | Expand/Contract <?phpo

GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.

I have a

how to load php class from another domain?
how to load php class from another domain?

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

column name cancatenation within PL/SQL
I have a PLSQL store procedure, and the following statement is part of a subquery
fname||lnam

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

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