db = sdb::getInstance(); $this->lang = $lang; } public function getBrends(){ $sql = "select * from catalogs_brends order by sort asc"; return $this->db->getAll($sql,array(),DB_FETCHMODE_ASSOC); } private function getParentID($id){ return $this->db->getOne("select parent_id from catalogs_brends where id=?", array($id)); } public function getTranslit($filter_translit){ return $this->db->getOne("select id from catalogs_brends where translit=?",array($filter_translit)); } public function getTranslitStr($filter_translit){ $t = explode(',',$filter_translit); $id = array(); foreach($t as $r){ $id[] = $this->db->getOne("select id from catalogs_brends where translit=?",array($r)); } return $id; } public function getBrend($id){ return $this->db->getRow("select * from catalogs_brends where id=?",array($id),DB_FETCHMODE_ASSOC); } } ?>