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

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I
just not seeing to obvious?

Help with form post data and arrays
Hi all,

I am new to this forum... It has been awhile since i have worked with arrays, and i a

Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but

Convert Binary String to Decimal
Trying to Get:
Decimal: 305419896

Out of:
Binary String: xV4

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing

Got A Free Server :(
So I was given a free server

http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1

read integers that returns a negative or prints the average
Im trying to finish this homework assignment by tommarow afternoon and I keep getting stuck.
Wr

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