Example #1
0
 /**
  * La funzione aggiorna i campi di un cv esistente riconosciuto tramite l'ID
  * 
  * @param CV $cv
  * @param type $idCV
  * @return boolean
  */
 public function updateCV(CV $cv, $idCV)
 {
     try {
         //imposto il timezone
         date_default_timezone_set('Europe/Rome');
         $timestamp = date('Y-m-d H:i:s', strtotime("now"));
         $this->wpdb->update($this->table, array('data_inserimento' => $timestamp, 'nome' => addslashes($cv->getNome()), 'cognome' => addslashes($cv->getCognome()), 'ruolo' => addslashes($cv->getRuolo()), 'regione' => addslashes($cv->getRegione()), 'provincia' => addslashes($cv->getProvincia()), 'cv' => addslashes($cv->getCv()), 'pubblicato' => addslashes($cv->getPubblicato())), array('ID' => $idCV), array('%s', '%s', '%s', '%d', '%s', '%s', '%s'), array('%d'));
         return true;
     } catch (Exception $ex) {
         _e($ex);
         return false;
     }
 }