/** * Funzione che salva una tabella di articolo all'interno del DB e in caso * affermativo restituisce l'ID della tabella generato * @param Tabella $tab * @return type */ public function saveTabellaArticolo(Tabella $tab) { try { $this->wpdb->insert($this->table_tabelle, array('nome' => $tab->getNomeTabella(), 'start_rows' => $tab->getStartRows(), 'end_rows' => $tab->getEndRows(), 'step_rows' => $tab->getStepRows(), 'start_cols' => $tab->getStartCols(), 'end_cols' => $tab->getEndCols(), 'step_cols' => $tab->getStepCols(), 'ante' => $tab->getAnte(), 'prezzo_iniziale' => $tab->getPrezzoIniziale(), 'incremento' => $tab->getIncremento()), array('%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%f', '%f')); return $this->wpdb->insert_id; } catch (Exception $ex) { _e($ex); return -1; } }