Location: PHPKode > projects > injooosm > components/com_injooosm/models/injooosm.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: injooosm.php 2010-02-04 11:51:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage frontend
 * @license GNU/GPL
 * @filesource
 *
 * 
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.model');

/**
 * injooosm Component injooosm Model
 *
 * @author	notwebdesign
 * @package	Joomla
 * @subpackage	injooosm
 * @since	1.5
 */
class injooosmModelinjooosm extends JModel {
	/**
	* Constructor
	*/
	function __construct() {

		parent::__construct();
	}

	function getTracksData($order, $limit) {
		global $mainframe;
		$db =& JFactory::getDBO();
		$query = "SELECT a.*, b.title AS cat FROM #__osm_files AS a"
			. "\n LEFT JOIN #__osm_cats AS b"
			. "\n ON a.catid=b.id"
			. "\n" . $order
			. "\n" . $limit;

		$db->setQuery($query);
		$rows = $db->loadObjectList();

		return $rows;
	}

	function getCatsData() {
		global $mainframe;

		$db =& JFactory::getDBO();

		$query = "SELECT * FROM #__osm_cats"
			. "\n ORDER BY title ASC";

		$db->setQuery($query);
		$rows = $db->loadObjectList();

		return $rows;
	}
}
Return current item: injooosm