Hello, this is my code that I have but I do not know how this would happen, I have a servlet
truth I have no idea and I am suffering if someone can help me I will thank you, by the way I already have what is the connection and that I only need the servelet
public void Modifica (int estado, java.util.Date fechaHora, java.util.Date fechaHoraultima, int id_publicacion)
{
Connection connection = null;
PreparedStatement prepareStmt = null;
String query = "update publicaciones set estado,"
+ "fechaHora=?, "
+ "fechaHoraultima=GETDATE() "
+ "where id_publicacion = ? ";
try{
connection = getDBConnection();
prepareStmt = connection.prepareStatement(query);
prepareStmt.setInt(1,estado);
prepareStmt.setDate(2,fechaHora);
prepareStmt.setDate(3,fechaHoraultima );
prepareStmt.setInt(4,id_publicacion);
prepareStmt.executeUpdate();
} catch (SQLException e) {
System.out.println(e.getMessage());
}
}