id = (int) $id; $this->fetch_datas(); } else { $this->set_code($code); $this->set_name($name); } } // end of member function __construct public static function get_instrument_name_from_id($id) { $instrument_name = ''; $id = intval($id); $query = "select instrument_name from nomenclature_instruments where id_instrument=".$id; $result = pmb_mysql_query($query); if (pmb_mysql_num_rows($result)) { $row = pmb_mysql_fetch_object($result); $instrument_name = $row->instrument_name; } return $instrument_name; } }