I'm trying to get my hands on a (PHP) script that will allow me to combine affiliate sales data and data from PPC search engines, to monitor the effectiveness of keywords.
Basically what I'm currently doing is to create a CSV report in Adwords that tells me clicks, cost, etc per keyword.
On the other side I have a CSV from my affiliate network where I have information such as keyword, campaign, etc, that I pass to the network as a subid in the url.

What I would like to do is combine the information from these CSV reports by importing them, saving the data in a database and then be able to run reports to see which keywords actually convert and which ones receive a lot of traffic but no conversions.

Is there such a script?

Thanks for your help.