<?php
/**
 * Joomla User ARO table
 *
 * @package 	CSVIVirtueMart
 * @author 		Roland Dalmulder
 * @link 		http://www.csvimproved.com
 * @copyright 	Copyright (C) 2006 - 2012 RolandD Cyber Produksi
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: core_acl_aro.php 1892 2012-02-11 11:01:09Z RolandD $
 */

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

/**
 * @package CSVIVirtueMart
 */
class TableCore_acl_aro extends JTable {
	
	/**
	* @param database A database connector object
	 */
	function __construct($db) {
		$this->reset();
		parent::__construct('#__core_acl_aro', 'id', $db );
	}
	
	/**
	* Cleans the class variables
	 */
	public function reset() {
		$this->setProperties(CsvivirtuemartModelAvailablefields::DbFields('core_acl_aro'));
	}
	
	public function check() {
		$db = JFactory::getDBO();
		$q = "SELECT ".$this->_tbl_key."
			FROM ".$this->_tbl."
			WHERE `section_value` = ".$db->Quote($this->section_value)."
			AND `value` = ".$db->Quote($this->value);
		$db->setQuery($q);
		$this->id = $db->loadResult();
	}
}
?>