Hi there!
I'm trying to aggregate a bunch of RSS feeds that i have in an SQL database.
Using Carp's aggregator syntax I need to do the following:
// to load the feeds and assign them a cache name
CarpCacheFilter("http://slashdot.org/index.rss", "agg2-slashdot");
CarpCacheFilter("http://www.infoworld.com/rss/columnists.rdf", "agg2-infoworld");
// and this combine the results from the two newsfeeds
CarpAggregate('agg2-slashdot|agg2-infoworld');
I'm trying to do the following but it's not working - I'm only getting one row from the database instead of the 5 that are in there. I've used "echo" to print them out and the quotes are in the right place. Can someone point me to the right commands - maybe an article on php.net? In my sad knowledge, line 2 below should print over and over, once for each row in the DB and the $aggregate variable will spit out the aggregate variables, each one followed by a pipe |
Well, when I echo $aggregate, it's printing that out fine, the problem is that it's not looping the CarpCacheFilter line...where am I going wrong?
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
CarpCacheFilter('$row[tubafeed_url]','aggregate-$row[tubafeed_id]');
$aggregate = "aggregate-$row[tubafeed_id]|";
}
CarpAggregate($aggregate);
My first post - thanks in advance for your help! -R