Col seguente codice i dati vengono ordinati in ordine di cognome. Come faccio ad ordinarli per più campi (es. per cognome, poi per nome e poi per data di nascita? Grazie.
<%
orderType = Request.QueryString("orderType")
ascDescType = Request.QueryString("ascDescType")
If orderType <> "name" AND orderType <> "authority" Then
orderType = "cognome"
End If
If ascDescType <> "DESC" Then
ascType = "ASC"
End If
'Creo una nuova stringa SQL
validateSQL = "SELECT * FROM tbl_Authors ORDER BY " & orderType & " " & ascDescType
'Creo un nuovo recordsheet
Set rs_userlist = Server.CreateObject ("ADODB.RecordSet")
'Apro il record sheet e eseguo SQL
rs_userlist.open validateSQL,adoCon
%>

Rispondi quotando