{source}
<?php
class LastPublication{
public function getID(){
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select(‘id’);
$query->from(‘#__jresearch_member’);
$query->where(‘firstname = “Miguel”‘);
$db->setQuery($query);
$result = $db->loadResult();
return $result;
}
public function getLatestPublications() {
$n = 0;
$db = JFactory::getDBO();
$latestPub = array();
$memberId = $this->getID();
$query = ‘SELECT p.* FROM ‘.$db->quoteName(‘#__jresearch_publication_internal_author’).’ ia JOIN ‘.$db->quoteName(‘#__jresearch_publication’).’ p WHERE ‘.$db->quoteName(‘p’).’.’.$db->quoteName(‘id’).’ = ‘.$db->quoteName(‘ia’).’.’.$db->quoteName(‘id_publication’).’ ‘.’ AND ‘.$db->quoteName(‘ia’).’.’.$db->quoteName(‘id_staff_member’).’ = ‘.$db->Quote($memberId).’ AND p.published = ‘.$db->Quote(‘1′).’ AND p.internal = ‘.$db->Quote(‘1′).’ ORDER BY ‘.$db->quoteName(‘p’).’.’.$db->quoteName(‘year’).’ DESC, STR_TO_DATE(p.’.$db->quoteName(‘month’).’, \’%M\’ ) DESC, ‘.’p.’.$db->quoteName(‘created’).’ DESC’;
if($n > 0){
$query .= ‘ LIMIT 0, ‘.$n;
}
$db->setQuery($query);
$result = $db->loadAssocList();
foreach($result as $row){
$latestPub[] = $row;
}
return $latestPub;
}
}
?>
{/source}
Technical Staff
Statistics and Operations Research Area (265)
Research Lines:
Contact Information
CV
Research support technician in SiDOR group (GRC ED431C 2016/040 SiDOR)
Degree in Economic Sciences (2017) at University of Vigo, and currently studying the Master in Statistical Tecniques (USC, UVigo and UDC). Apart from of what I learned on my academic studies, I have knowledge of R programming, Matlab, web scrapping using “selenium” as well as certain specific statistical models like “Multilevel models”.
Last Publication
{source}
<?php
$lastP = new LastPublication();
$Publications = $lastP->getLatestPublications();
?>
<ul>
<?php
$count = 0;
foreach ($Publications as $p):
?>
<li><a href=”en/publications?view=publication&task=show&id=<?php echo $p[‘id’] ?>”><?php echo $p[‘title’]; ?></a></li>
<?php
if($count == 3){
break;
}
$count++;
endforeach;
?>
</ul>
{/source}