function getLinks() // ~X2C
{
$db = MEconDAVDB::Connect();
- $sql = "SELECT link_id FROM Relations WHERE article_id = ".$this->noticia;
- return $db->getCol($sql);
+ $sql = "SELECT R.link_id, A.headline
+ FROM Relations R, Articles A
+ WHERE R.link_id = A.article_id
+ AND R.article_id = ".$this->noticia;
+ $result =& $db->query($sql);
+ $links = array();
+ while($row =& $result->fetchRow())
+ $links[] = array('numero'=>$row[0], 'texto'=>$row[1]);
+ return $links;
}
// -X2C
$sql = "SELECT file_for_article_id, caption FROM FilesForArticle WHERE article_id = ".$this->noticia;
$result =& $db->query($sql);
$archivos = array();
- while($row =& $result->getRow())
+ while($row =& $result->fetchRow())
$archivos[] = array('numero'=>$row[0], 'texto'=>$row[1]);
return $archivos;
}