Location: PHPKode > projects > Chalange > com_chalange/models/carreras.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.model');
 class ChalangeModelCarreras extends JModel{
 	var $data;
 	function getCarreras($idChalange){
 		if (empty( $this->data)){
 			$query= 'SELECT *, UNIX_TIMESTAMP(registerDataStart) as registerDataStartUnix, UNIX_TIMESTAMP(registerDataEnd) as registerDataEndUnix '
 			.'FROM #__gcd_carreras INNER JOIN #__gcd_carrerasChalange ON #__gcd_carreras.id = #__gcd_carrerasChalange.idcarrera'
 			." WHERE #__gcd_carrerasChalange.idChalange =$idChalange ORDER BY fecha";
 			$this->data= $this->_getList($query);
 		}
 		return $this->data;
 	}
 }
?>
Return current item: Chalange