Location: PHPKode > projects > Chalange > com_chalange/models/registered.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.model');
 class ChalangeModelRegistered extends JModel{
 	var $data;
 	function getRegistereds($idCarrera){
 		if (empty( $this->data)){
 			$query= 'SELECT *'
 			.'FROM #__gcd_registered'
 			." WHERE #__gcd_registered.idRace =$idCarrera "
 			.'ORDER BY category, dorsal';
 			$this->data= $this->_getList($query);
 		}
 		return $this->data;
 	}
 	function getRaceName($idCarrera){
 		$query='SELECT nombre '
 		.'FROM #__gcd_carreras '
 		."WHERE id=$idCarrera";
 		$aux= $this->_getList($query);
 		return $aux[0]->nombre;
 	}
 }
?>
Return current item: Chalange