I am trying to modify this database display script:
I displays a MsAccess Database using SQL commands
It looks something like this:
<%
Dim oRS
Dim sSQL
sSQL = "select max(page) as thepage, count(*) as antal from " & Rec_GetTablePrefix() & "rec_logging where datum>='" & GetFormattedDate(dDate1) & "' AND datum <='" & GetFormattedDate(dDate2) & "' group by datum, page order by count(*) desc"
'Response.Write sSQL
Set oRS = oConn.Execute(sSQL)
Dim nCol
nCol = "#AAAAAA"
While Not oRS.EOF
If nCol = "#AAAAAA" Then
nCol = "#FFFFFF"
Else
nCol = "#AAAAAA"
End If
%>
<tr>
<td bgcolor="<%=nCol%>"><%=oRS("thepage")%></td>
<td bgcolor="<%=nCol%>"><%=oRS("antal")%></td>
</tr>
<%
oRS.MoveNext
Wend
%>
OK i need help with the top SQL part... making the string correctly... Right now it takes the url of the most occuring page. I need it to display the URL, and 2 other strings regardless of how often it occurs... just in order.
For example i have tried stuff like this
sSQL = "select page as thepage, select email as theemail, select senderemail as emailer"
and then changing the table calls respectively and it says i have the wrong SQL string?
so heres my main question...
How can i create the correct SQL command string?





Bookmarks