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

Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

how to easy edit text, with box? Help.
Hi.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

Problem with shopcart code
Hello, I am having a bit of trouble being able to add a product to my shopcart. My mysql database i

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

Ajax Issues - Update Panel / Timer. Intellisense doesn't know about them
Type 'System.Web.UI.ScriptManager' does not have a public property named 'UpdatePanel'. That is wha

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