/** * La funzione dato un determinato cv, restituisce il suo ID * * @param CV $cv * @return type */ public function getCvID(CV $cv) { try { $result = $this->wpdb->get_var($this->wpdb->prepare("SELECT ID FROM " . $this->table . " WHERE email = %s AND categoria = %d", addslashes($cv->getEmail()), addslashes($cv->getCategoria()))); if ($result != null) { return stripslashes($result); } return false; } catch (Exception $ex) { _e($ex); return -1; } }