<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* MODULE NAME : roomSetups_model.php
*
* DESCRIPTION : roomSetups model
*
* MODIFICATION HISTORY
* V1.0 2008-10-31 11:47 PM - Leane Verhulst - Created
*
* @package ConCentric
* @subpackage roomSetups model component Class
* @author Leane Verhulst
* @copyright Copyright (c) 2008
* @license http://www.gnu.org/licenses/gpl.html
*/
class Roomsetups_model extends base_model
{
function Roomsetups_model()
{
parent::Base_model();
$this->_TABLES = array(
'roomSetups' => $this->config->item('concentric_table_prefix') . 'roomSetups',
'colors' => $this->config->item('concentric_table_prefix') . 'colors'
);
// Cache to store already fetched items
$this->_CACHE = array();
}
function fetchRoomSetups()
{
// Build a query to get the data
$this->db->select('roomSetup.id, roomSetup.name, roomSetup.description, color.id AS color_id, color.name AS color_name, color.htmlCode AS color_htmlCode');
$this->db->from($this->_TABLES['roomSetups'] . ' roomSetup');
$this->db->join($this->_TABLES['colors'] . ' color', 'color.id = roomSetup.colorID', 'left');
$this->db->order_by('roomSetup.name ASC');
$query = $this->db->get();
return $query;
}
}
/* End of file colors_model.php */
/* Location: ./system/application/models/colors_model.php */