Questa è la mia query ........ Potresti aiutarmi gentilmente???
Grazie.
<FORM name="modulo" action="" method="post">
<select name="input"onChange="Riempi(this.options.selected Index)">
<option> Seleziona un prodotto </option>
<%
Connection conn = null;
PreparedStatement st = null;
ResultSet rs = null;
String driver = "org.gjt.mm.mysql.Driver";
Class.forName(driver);
try {
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/pubblico","root","ivano76");
st = conn.prepareStatement("select descrizione, tipo from fondi order by tipo);
rs = st.executeQuery();
while(rs.next()){
Fondo fondo = new Fondo();
fondo.setTipolo_2a(rs.getString("tipolo_2a"));
fondo.setDescri_2a(rs.getString("descri_2a"));
%>
<option> <%= fondo.tipolo_2a%> </option>
<%
}
}catch (SQLException sqle) {
throw new SQLException("Errore persistenza" +sqle);
}finally {
if(conn != null)
rs.close();
st.close();
conn.close();
}
%>