getting the problem ~
mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /studhome/1/0803087/public_html/RSS.php on line 14
trying to create a RSS feed
no idea what is wrong, so can anyone help
<?
// Connect to database
DEFINE ('DB_USER', '******');
DEFINE ('DB_PASSWORD', '********');
DEFINE ('DB_HOST', '*****');
DEFINE ('DB_NAME', '******');
// Get latest items from db
$sql = "SELECT Name FROM Games ORDER BY date_added DESC limit 0,10";
$rst = mysql_query($sql);
// Loop through data and build feed items
$items = "";
while($a_row = mysql_fetch_assoc($rst))
{
$items.= "<item>";
$items.= " <title>{$a_row['title']}</title>";
$items.= " <link>{$a_row['link']}</link>";
$items.= " <description>{$rst['description']}</description>";
$items.= "</item>";
}
// Build feed text
$feed = "<?xml version=\"1.0\"?>";
$feed.= "<rss version=\"2.0\">";
$feed.= " <channel>";
$feed.= " <title>My cool feed</title>";
$feed.= " <link>http://www.dude.com/</link>";
$feed.= " <description>A cool feed</description>";
$feed.= " $items";
$feed.= " </channel>";
$feed.= "</rss>";
// Display feed text
echo $feed;
?>