Subversion-Projekte lars-tiefland.ci

Revision

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

Revision Autor Zeilennr. Zeile
1809 lars 1
<?php
2
 
3
/**
4
 *
5
 * @package WebanOS CI
6
 * @author Lars Tiefland <ltiefland@gmail.com>
7
 * @copyright 2016
8
 * @version $Rev: 1826 $
9
 */
10
 
1810 lars 11
/**
12
 * Auspraegung_model
13
 *
14
 * @package WebanOS CI
15
 * @author Lars Tiefland
16
 * @copyright 2016
17
 * @version $Id: Auspraegung_model.php 1826 2016-12-21 19:16:15Z lars $
18
 * @access public
19
 */
1809 lars 20
class Auspraegung_model extends CI_Model
21
{
1810 lars 22
	/**
23
	 * Auspraegung_model::__construct()
24
	 *
25
	 * @return
26
	 */
1809 lars 27
	public function __construct()
28
	{
29
		parent::__construct();
30
	}
31
 
1810 lars 32
	/**
33
	 * Auspraegung_model::get_list()
34
	 *
35
	 * @return
36
	 */
1809 lars 37
	public function get_list()
38
	{
39
		$sql = "SELECT
40
				id
41
			FROM
42
				auspraegung
43
		";
44
		$res = $this->db->query($sql);
1810 lars 45
		$rows = array();
1809 lars 46
		while ($row = $res->unbuffered_row('array'))
47
		{
48
			$row = $this->get($row["id"]);
1810 lars 49
			$rows[]=$row;
1809 lars 50
		}
1810 lars 51
		return $rows;
1809 lars 52
	}
53
 
1810 lars 54
	/**
55
	 * Auspraegung_model::get()
56
	 *
57
	 * @param mixed $id
58
	 * @return
59
	 */
1826 lars 60
	public function get($id)
1809 lars 61
	{
62
		$sql = "SELECT
63
				*
64
			FROM
65
				auspraegung
66
			WHERE
67
				id=".$id."
68
		";
69
		$res = $this->db->query($sql);
70
		$row = $res->unbuffered_row($row);
71
		return $row;
72
	}
73
}
74
 
75
?>