예제 #1
0
 public function addFile($file, $etichetta, $id)
 {
     $result = false;
     $etichetta = $this->conn->str($etichetta);
     $sort = new Sorting("file", "sorting", "fk_tabella=" . $this->idTabella . " and fk_record=" . $id);
     $sorting = $sort->restituisci_max_sorting() + 1;
     $query = "insert into file (file, fk_tabella, fk_record, tipoF, titoloF, sorting) values ('" . $file . "', " . $this->idTabella . ", " . $id . ", '" . $this->tipo . "', '" . $etichetta . "', " . $sorting . ")";
     print $query . "<br /><br />";
     if ($this->conn->query($query)) {
         $result = true;
     }
     return $result;
 }