maxim Posted April 16, 2007 Share Posted April 16, 2007 Heres my situation. theres a XML file located on the internet. every week or so. this xml file gets updated with one or two new entry's. i have a php script which can read all the entrys i want from this xml file. and then put it into a database. the problem is say i run the php script again to update the database and add the new entry's that the xml file has. every thing gets added again. each time the script is run. the enter xml file entry's are added again. so the database get full with duplicates triplcate records ect ect. how would i go about preventing the same record being added over and over. database is sqlite Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted April 16, 2007 Share Posted April 16, 2007 write a script to read each line in the xml file and check for a match with the line you are about to update it with. if there is a match, no update, else, update with new line. Quote Link to comment Share on other sites More sharing options...
maxim Posted April 18, 2007 Author Share Posted April 18, 2007 just like to say thanks i got the ball rolling - i just had a brain freeze and didnt know where to start. still got a few issues but should be able to iron them out. so yeah, thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.