Ciao, ho un problema con questo codice:Perchè non riesco a raggruppare il campo "Tipo" nella query... ho scritto così:codice:'FACCIO POPOLARE LA PRIMA SELECT sql = "SELECT * FROM Anagr where prenotata = false ORDER BY targa asc" Set rec = Server.CreateObject("ADODB.Recordset") rec.Open sql, conn, 3, 3 If rec.EOF Then response.write "KO" else %> <select size="1" name="tipo" onChange="window.document.location='pagina.asp?tipo='+this.options[this.selectedIndex].value;"> <% tipoSel = request.querystring("tipo") %> <option value="<%=tipoSel%>"><%=tipoSel%></option> <% If Not rec.EOF Then Do While Not rec.EOF %> <option value= "<% = Trim(rec("tipo")) %>"><% = Trim(rec("tipo")) %></option> <% rec.MoveNext Loop End If rec.Close %> </select>
codice:sql = "SELECT tipo, prenotata, targa FROM Anagr where prenotata = false group by tipo, prenotata, targa ORDER BY targa asc"
dove sbaglio?

Rispondi quotando