Managing daily ad updates

Hi all!

I have a classified ads site.
Users post free ads of cars, motorcycles or boats.

I have a need of bulk inputing ads on a daily basis.
These ads are from partners.

They make available a CSV file with most of the fields matching my database structure, so importing is not a problem.

The CSV file will contain all active vehicles (for publication) and not just the updates,
modified or removed.

So a vehicle that no longer included in the file, implies a cancellation of its publication.

What would be the best solution for controlling yesterdays extraction from todays’?

This is, If yesterday the file had these ID’s:


and today:


How would I remove the online posts which dissapeared from the CSV file?

Thanks for your help,

Mark all expired, then remove the expired flag as you traverse the CSV file for each car record.

I didn’t think of that.

I may be easier then saving all the ID’s to a temp table and comparing.


I wouldn’t delete them - I’d have a visible flag. This way you can reactivate the ad at any time and running a report to show past ads is also easier to do.

I’d also advise downloading OpenX and looking at some of its code but also it’s database structure. I’m not advising scrapping your existing ad system in favor of it since what you have sounds pretty specialized - I’m advising doing a bit of inspiration mining against its structure. Ideas for how to implement what you’re doing, what you’d like to do, but also some things you might not have thought of. Though I didn’t adopt it for my ad solution I did find the software very instructive. (I didn’t adopt it because it’s a chainsaw and I needed a scapel).