Revision 1207 | Revision 1209 | 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: 1208 $*/class Artikel_to_bestellung_model extends CI_Model{public function __construct(){parent::__construct();}public function get($id){$sql = "SELECT`database`FROMshops sJOINBestellung bONs.id=b.shops_ID";$res = $GLOBALS['order_db']->query($sql);$row = $res->unbuffered_row('array');$database = $row['database'];$artikel = array();$sql = "SELECTab.*,a.FatherFROMartikel_to_Bestellung abJOIN".$db.".artikel aONa.id=ab.artikelWHEREbestellung = ".$id."";$res = $GLOBALS['order_db']->query($sql);while ($row = $res->unbuffered_row('array')){$artikel[] = $row;}return $artikel;}}?>