Subversion-Projekte lars-tiefland.ci

Revision

Revision 1144 | Revision 1208 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1144 Revision 1207
Zeile 3... Zeile 3...
3
/**
3
/**
4
 *
4
 *
5
 * @package WebanOS CI
5
 * @package WebanOS CI
6
 * @author Lars Tiefland <ltiefland@gmail.com> 
6
 * @author Lars Tiefland <ltiefland@gmail.com> 
7
 * @copyright 2016
7
 * @copyright 2016
8
 * @version $Rev: 1144 $
8
 * @version $Rev: 1207 $
9
 */
9
 */
Zeile 10... Zeile 10...
10
 
10
 
11
class Artikel_to_bestellung_model extends CI_Model
11
class Artikel_to_bestellung_model extends CI_Model
12
{
12
{
Zeile 15... Zeile 15...
15
		parent::__construct();
15
		parent::__construct();
16
	}
16
	}
Zeile 17... Zeile 17...
17
 
17
 
18
	public function get($id)
18
	public function get($id)
-
 
19
	{
-
 
20
		$sql = "SLECT
-
 
21
				`database`
-
 
22
			FROM
-
 
23
				shops s
-
 
24
			JOIN
-
 
25
				Bestellung b
-
 
26
			ON
-
 
27
				s.id=b.shops_ID
-
 
28
		";
-
 
29
		$res = $GLOBALS['order_db']->query($sql);
-
 
30
		$row = $res->unbuffered_row('array');
19
	{
31
		$database = $row['database'];
20
		$artikel = array();
32
		$artikel = array();
21
		$sql = "SELECT
33
		$sql = "SELECT
-
 
34
				ab.*,
22
				*
35
				a.Father
23
			FROM
36
			FROM
-
 
37
				artikel_to_Bestellung ab
-
 
38
			JOIN
-
 
39
				".$db.".artikel a
-
 
40
			ON
24
				artikel_to_Bestellung
41
				a.id=ab.artikel
25
			WHERE
42
			WHERE
26
				bestellung = ".$id."
43
				bestellung = ".$id."
27
		";
44
		";
28
		$res = $GLOBALS['order_db']->query($sql);
45
		$res = $GLOBALS['order_db']->query($sql);