1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Getting Number by user

Discussion in 'C#' started by danjapro, Nov 17, 2005.

  1. #1
    Here is my SQL code in my asp page that calls the number od downloads made from tbldownload, but I want to get specfic with the number of downloads by user from tbluser

    Download count sql
    Set rsDownloadAdmin = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT downloadid, downloadtitle, downloadcount FROM tbldownload ORDER BY DownloadID"
    rsDownloadAdmin.Open strSQL, adoCon
    SEMrush
    This works fine , I just want to add the statment and syntax that will show downloads by spefic user or user id
     
    danjapro, Nov 17, 2005 IP
    SEMrush
  2. BurgerKing

    BurgerKing Active Member

    Messages:
    397
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Hi,

    Try

    Download count sql
    Set rsDownloadAdmin = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT UserID, count(downloadid) FROM tbldownload group by UserID"
    rsDownloadAdmin.Open strSQL, adoCon

    This will return the total number of downloads for each UserID
     
    BurgerKing, Nov 20, 2005 IP