FundacionLQDVI_WebCongresos/www/administrator/components/com_sql2excel/models/dbtest.php

55 lines
1.0 KiB
PHP
Raw Normal View History

<?php
/*
* @component SQL 2 Excel Component
* @copyright Copyright (C) Joomla-R-Us, joomla-r-us.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3
*/
// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.model');
class Sql2excelModelDbtest extends JModel
{
var $_dbID;
var $_dbData;
/**
* Constructor that retrieves the ID from the request
*/
function __construct()
{
parent::__construct();
$array = JRequest::getVar('id', 0, '', 'array');
$this->setId((int)$array[0]);
}
function setId($id)
{
// Set id and wipe data
$this->_dbID = $id;
$this->_dbData = null;
}
/**
* Method to get data
* @return object with data
*/
function getDatabaseParms($db_id)
{
$db = & JFactory::getDBO();
$query = ' SELECT * FROM #__sql2excel_databases ' .
' WHERE id = '. $db_id;
$this->_db->setQuery( $query );
$row = $db->loadObjectList();
$this->_dbData = $row;
return $row;
}
}