Hi David,
I am currently trying to put feeds into an mySQL database and Magic Parser does the trick very well.
The only problem is: right now I am simply deleting all existing feed records from the database and after this, I add the complete feed.
This works, but I'd actually I'd like to change only the updated records that have been changed. Since the products have a product ID, this can be done quite easily.
My problem, however, is when a product gets removed from the feed. How can I figure out it has been deleted and delete it from my database.
Any ideas?
/Jasper
Great trick, it works like a charm!
Thanks David!
/Jasper
Hi Jasper,
The trick here is to add a "deleteme" field of type INT to your table. Before import; set deleteme=1 in all records using something like:
UPDATE mytable SET deleteme=1
Then, perform your update, and as you update each record, set deleteme back to 0. Finally, after running import, you can remove expired records using:
DELETE FROM mytable WHERE deleteme=1
Hope this helps!
Cheers,
David.