Forum Moderators: open
Basically, I want to create a script that will read all that data and present it to me in a understandable HTML format and also i need it to arrange the data according to the country that has the highest amount of hits at the top and the lowest at the bottom.
I would be greatful if anyone can help me out.
Cheers
Linda
This will put the data in the order you need.
Then in your ASP page:
(you would have already set up a recordset object above and named it something.....)
<tr>
<td>Country</td>
<td>Total</td>
</tr>
<% while (!rsStats.EOF) { %>
<tr>
<td><%=rsStats("country")%></td>
<td><%=rsStats("total") %> </td>
</tr>
<% rsStats.MoveNext; } %>
That's all there is to it.
The SQL Statement (for access or SQL) while be:
SQL = "SELECT Total, Country FROM Statistics ORDER BY Total desc;"
You can create a recordset is ASP and use the following ASP code to display the data:
<%
While Not RecordSetName.EOF
Response.Write(SQL("Country") & " - " SQL("Total") & "<br>")
RecordSetName.MoveNext
Wend
%>
Chris.