Hur sorterar jag efter den som har mest påäng? Kolla min kod:
<%Set RS=Conn.Execute("Select * From users Order By id desc")
If RS.EOF Then%>
<tr>
<td valign="top" colspan="2">Inga nya medlemmarna</td>
</tr>
<%Else
x=0
Do Until RS.EOF Or x=5
Summa=RS("dagbokp")+RS("gastbokp")+RS("forump")+RS("messp")+RS("inp")+RS("utp")+RS("bildp")+RS("regp")+RS("bonusp")%>
<tr>
<td width="68%"><%=RS("anvnamn")%></td>
<td width="32%">
<p align="right"><%=Round(Summa,0)%> p</td>
</tr>
<%x=x+1
RS.MoveNext
Loop
End If%>
Microsoft JET Database Engine error '80040e21'
You tried to execute a query that does not include the specified expression 'id' as part of an aggregate function.
/johnny/start2.asp, line 235