Subversion-Projekte lars-tiefland.ci

Revision

Revision 1827 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

/**
 *
 * @package WebanOS CI
 * @author Lars Tiefland <ltiefland@gmail.com> 
 * @copyright 2016
 * @version $Rev: 1836 $
 */

/**
 * Auspraegung_model
 * 
 * @package WebanOS CI
 * @author Lars Tiefland
 * @copyright 2016
 * @version $Id: Auspraegung_model.php 1836 2016-12-21 22:48:38Z lars $
 * @access public
 */
class Auspraegung_model extends CI_Model
{
        /**
         * Auspraegung_model::__construct()
         * 
         * @return
         */
        public function __construct()
        {
                parent::__construct();
        }

        /**
         * Auspraegung_model::get_list()
         * 
         * @return
         */
        public function get_list()
        {
                $sql = "SELECT
                                id
                        FROM
                                auspraegung
                ";
                $res = $this->db->query($sql);
                $rows = array();
                while ($row = $res->unbuffered_row('array'))
                {
                        $row = $this->get($row["id"]);
                        $rows[] = $row;
                }
                return $rows;
        }

        /**
         * Auspraegung_model::get()
         * 
         * @param mixed $id
         * @return
         */
        public function get($id)
        {
                $sql = "SELECT
                                *
                        FROM
                                auspraegung
                        WHERE
                                id=".$id."
                ";
                $res = $this->db->query($sql);
                $row = $res->unbuffered_row('array');
                return $row;
        }
}

?>