Professional Web Applications Themes

getting a user rank from database? - Coldfusion - Advanced Techniques

I want users to be able to see their current rank amongst other users. I am somewhat stuck on how exactly I would query my database and retrieve this information. Any ideas?...

  1. #1

    Default getting a user rank from database?

    I want users to be able to see their current rank amongst other users. I am somewhat stuck on how exactly I would query my database and retrieve this information. Any ideas?
    davellaman Guest

  2. #2

    Default CFFORM Flash not caching

    Hi all,

    Where does CF store cached cfform flash forms? I've searched on every
    computer which has CF7 installed and I can't find it.

    I'll do a view source of the page which has the form in it and do a
    search for the file, '/541738542.mxml.cfswf' which should contain the
    flash form, but can't find that file.

    It seems that CF7 doesn't cache the forms on any of our servers because
    the forms take way too long to reload.

    I'm looking at the flex-config.xml file and turning on the production
    switch, but it's not helping.

    Anyone have a clue?

    Thanks
    Don Vaillancourt Guest

  3. #3

    Default Re: CFFORM Flash not caching

    Don,

    Did your message get posted to the wrong thread? The forums seem to be a bit flaky this weekend.
    mxstu Guest

  4. #4

    Default Re: getting a user rank from database?

    Originally posted by: davellaman
    I want users to be able to see their current rank amongst other users. I am
    somewhat stuck on how exactly I would query my database and retrieve this
    information. Any ideas?

    What determines user rank in your application/database and what do you want to
    display to the user (ex. Your rank is #10 out of 100, etc..)?



    mxstu Guest

  5. #5

    Default Re: getting a user rank from database?

    we would be displaying rank as 5 out of 500. Rank in database would be
    determined by user points.

    So if i were to order a query by points, i would then have the list in point
    order, however, how do I then select the exact user I want to find and also how
    do I get their exact spot in the points list?


    Thanks,

    Mark

    davellaman Guest

  6. #6

    Default Re: getting a user rank from database?

    And do you want to display the ranking for just the current user:

    you are 5 out of 500

    OR highlight the current user within a ranking of all users :

    x 1 out of 500
    x 2 out of 500
    x 3 out of 500
    x 4 out of 500
    >>you are 5 out of 500<<
    x 6 out of 500



    mxstu Guest

  7. #7

    Default Re: getting a user rank from database?

    After getting your query by points, you can do a QofQ (query of
    queries) on that data for each user that you need. So for example, if
    you want Ted's rank you would write:

    <cfquery name="anything" dbtype="query">
    select Rank
    from (originalquery)
    where Username='Ted'
    </cfquery>

    Now you have a second query with ted's rank without hitting the DB
    again.

    baz Guest

  8. #8

    Default Re: getting a user rank from database?

    One more thing, the code in the last post assumes that the scores for each user
    will be unique. If they are not, you will need to add an additional clause to
    determine the ranking when the scores are the same.

    mxstu Guest

Similar Threads

  1. User Database Table
    By Bill Buppert in forum ASP.NET Security
    Replies: 0
    Last Post: October 28th, 05:00 PM
  2. Replies: 1
    Last Post: July 14th, 08:05 PM
  3. Replies: 2
    Last Post: July 14th, 05:30 PM
  4. How to I RANK my list?
    By Vishal Parkar in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 10th, 07:55 PM
  5. Replies: 4
    Last Post: July 1st, 06:01 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139