Revision 59 | Revision 519 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?php/*** @author Lars Tiefland* @copyright 2016*/class Preise_model extends CI_Model{public function get_prices($artikel_id){$preise = array();$query = $this->db->get_where('preise', array("artikel_id" => $artikel_id,"language" => "DE",));while ($row = $query->unbuffered_row('array')){$preise["preis".$row["preis_index"]] = $row["preis"];}return $preise;}public function get_single_price($artikel_id,$preis_index=1){$query = $this->db->get_where('preise', array("artikel_id" => $artikel_id,"preis_index" => $preis_index,"language" => "DE",));$preis = $query->result_array();return $preis["preis"];}}?>