SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Displaying MSA

  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Displaying MSA

    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?

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, it would probably benefit you to post this in the appropriate forum. This is the PHP/MySQL forum as noted in the forum title. The ASP Forum is back one level.

    http://www.sitepointforums.com/forum...?s=&forumid=35
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, excuse my error.

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem, if I was an Admin I would have moved it for you. So I did the next best thing, I think.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •