Blame view

modules/default/model/gallery.class.php 515 Bytes
8d65d0ce   andryeyev   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <?php
  Class Gallery{
   private $db;
   private $lang;
   
   function __construct($lang){
    $this->db = sdb::getInstance();
    $this->lang = $lang;
   }
  
   public function getViewProduct($product_id){
    return $this->db->getAll("select *,name_{$this->lang} as name from catalogs_gallery where product_id=?",array($product_id),DB_FETCHMODE_ASSOC);
   }
   
   public function getViewOne($id){
    return $this->db->getRow("select *,name_{$this->lang} as name from catalogs_gallery where id=?",array($id),DB_FETCHMODE_ASSOC);
   } 
  
  }
  ?>