View Full Version : The old rss question...

08-28-2007, 05:55 AM
It seems like one of those questions that has popped up every week or two, but i'm gonna ask it any way,

I want to have it so my RSS file gets the last 5 entries into my mysql table, I thought that maybe you'd run the query in the xml file and have it do the old while($data = mysql_fetch_array($query)) , or something like that. Any one have a solution or a good tutorial.

Thanks, Glyn.:D

08-28-2007, 07:59 AM
Well, ya basically; that's the gist of it. You're using php/mysql to output as an xml file instead of html. The while loop will output the nodes in the xml schema.

08-28-2007, 08:50 AM
So does this mean I will have to, every time I make a post, rewrite a file? Or is there a way I can have a set code in an xml file and just leave it?

08-28-2007, 11:58 AM
Here's a good reference about rss http://www.rssboard.org/rss-specification

And and magpierss is a good start for generating your own feed: http://magpierss.sourceforge.net/