105 public function fetch($id = 0, $fk_product = 0, $lang =
'')
107 $sql =
"SELECT rowid, fk_product, lang, label, description, note";
108 $sql .=
" FROM ".$this->db->prefix().$this->table_element;
110 $sql .=
" WHERE rowid = ".((int) $id);
112 $sql .=
" WHERE fk_product = ".((int) $fk_product).
" AND lang = '".$this->db->escape($lang).
"'";
115 $resql = $this->db->query($sql);
117 $this->error = $this->db->lasterror();
121 $obj = $this->db->fetch_object($resql);
122 $this->db->free($resql);
127 $this->
id = (int) $obj->rowid;
128 $this->fk_product = (int) $obj->fk_product;
129 $this->lang = $obj->lang;
130 $this->label = $obj->label;
132 $this->note = $obj->note;