public static function getRuleModuleName($module_id, $action, $adminOnly) {

		$db = Database::getInstance();

		$query =
			' SELECT m.name AS moduleName,r.action AS ruleAction, r.admin_only '.
			' FROM `rules` AS r '.
			' INNER JOIN `modules` AS m ON m.id = r.module_id '.
			' WHERE m.id = ? AND r.action = ? AND r.admin_only = ?';

		$db->setQuery($query);
		$module = $db->loadObject(array($module_id, $action, $adminOnly));

		return $module;

	}
public static function getRuleModuleName($module_id, $action, $adminOnly) {

		$db = Database::getInstance();

		$query =
			' SELECT m.name AS moduleName,r.action AS ruleAction, r.admin_only '.
			' FROM `rules` AS r '.
			' INNER JOIN `modules` AS m ON m.id = r.module_id '.
			' WHERE m.id = ? AND r.action = ? AND r.admin_only = ?';

		$db->setQuery($query);
		$module = $db->loadObject(array($module_id, $action, $adminOnly));

		return $module;

	}
public static function getRuleModuleName ( $ module_id , $ action , $ adminOnly ) { $ db = Database :: getInstance ( ) ; $ query = ' SELECT m.name AS moduleName,r.action AS ruleAction, r.admin_only ' . ' FROM `rules` AS r ' . ' INNER JOIN `modules` AS m ON m.id = r.module_id ' . ' WHERE m.id = ? AND r.action = ? AND r.admin_only = ?' ; $ db -> setQuery ( $ query ) ; $ module = $ db -> loadObject ( array ( $ module_id , $ action , $ adminOnly ) ) ; return $ module ; }
Returns the db-record of the current Rule object, NULL otherwise.

@param	int		Module ID.
@param	string	Action name.
@param	bool	Flag to get admin-only rules.

@return	stdClass|NULL
Returns the db - record of the current Rule object NULL otherwise .