Hi Andrew
Thanks again for producing these fab addons - I’m using them a lot and finding them invaluable.
Here’s a scenario for you:
I have a property site where the properties that are displayed come from different sources: the owner adds some manually via the EE CP (although hasn’t yet!), and the others are imported via XMLGrab from external xml feeds.
The problem:
If items in the external feeds are updated, they aren’t updated when XMLGrab is re-run, and the data in EE is therefore out of date (think prices etc which are important on a property site).
My workaround:
What I’m doing currently is removing all properties before I run XMLGrab again, like this:
global $DB;
// Remove all entries within Properties weblog
$query = $DB->query("DELETE FROM `exp_weblog_data` WHERE `weblog_id` = 5");
$query = $DB->query("DELETE FROM `exp_weblog_titles` WHERE `weblog_id` = 5");
Of course this won’t work when the owner starts adding properties himself. I suspect I’m have a ‘source’ custom field and only delete those where the source equals ‘xml’. Any idea what my SQL would be like to do that?
What do you think?
The site isn’t live yet and I just wanted to pick your brains on whether you think this could be done better. I’ll be wanting users to be able to save certain properties on the site so it’s very important that the urls and reference numbers (not entry_id) stay the same on every import. I think it should work, any thoughts?
Cheers
Jim
