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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

User information
Hi All,
By using t-code SUIM we get all the user details,if suppose we donot have permission t

Problem with PHP code- simple contact form
Hi Folks,
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a co

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

upload control not working with update panel
Hi,

I am working with Asp.Net FileUpload control with ajax update panel,

if i use the

Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup fo

Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following O

PHP XML extraction text
I would like to extract an xml text and have that text directly echo(print) out on my web page. Her

Deleting pointers froms vector?
Hi. I have a vector filled with pointers and I want to delete the pointers. I could do a loop and do

pspell
using pspell, is it possible to get words that would be best in the current phrase?

For examp

preg-match with a string and numbers
Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the strin

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