Something challenging....
I'm using a simple php code to generate RSS Feeds from my DB which is for my Joomla 3 website.
I managed to get the list of items from the database but now I'm struggling to get the correct link for each item.
Here is the code which populates the items with the links...
$results = $mysqli->query("SELECT * FROM bs_analiza ORDER by analiza_pk DESC");
if($results){ //we have records
while($row = $results->fetch_object()) //loop through each row
{
$item = $rss->addChild('item'); //add item node
$title = $item->addChild('title', $row->h_team . " vs " . $row->a_team); //add title node under item
$link = $item->addChild('link', 'http://dev.90mins.org/index.php?option=com_betting&view=pick&id='. $row->analiza_pk); //add link node under item
$link->addAttribute('isPermaLink', 'false'); //add link node attribute
$description = $item->addChild('description', '<![CDATA['. htmlentities($row->datum_ura) . ']]>'); //add description
$date_rfc = gmdate(DATE_RFC2822, strtotime($row->published));
$item = $item->addChild('pubDate', $date_rfc); //add pubDate node
}
}
If I use simple link like www.my-site.com and add above will work but all items will point to the same page - www.my-site.com.
Any ideas how to attach unique links to items?