Location: PHPKode > projects > Chalange > com_chalange/models/playerform.php
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.model');
 class ChalangeModelPlayerform extends JModel{

 	function getCategories($idCarrera){
 		$query='SELECT #__gcd_categories.* '
 		.'FROM #__gcd_categories INNER JOIN #__gcd_categoriesrace ON #__gcd_categories.id=#__gcd_categoriesrace.idCategory INNER JOIN #__gcd_carreras ON #__gcd_categoriesrace.idRace=#__gcd_carreras.id '
 		."WHERE #__gcd_carreras.id=$idCarrera";
 		return$this->_getList($query);
 	}

 	function getPlayer($playerId){
 		$query='SELECT * '
 		.'FROM #__gcd_players '
 		."WHERE #__gcd_players.id=$playerId";
 		$aux=$this->_getList($query);
 		return $aux[0];
 	}
 	
 }
//SELECT jos_gcd_categories.description FROM jos_gcd_categories INNER JOIN jos_gcd_categoriesrace ON jos_gcd_categories.id=jos_gcd_categoriesrace.idCategory INNER JOIN jos_gcd_carreras ON jos_gcd_categoriesrace.idRace=jos_gcd_carreras.id WHERE jos_gcd_carreras.id=1
?>
Return current item: Chalange