ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Fairness of random results

May 26, 2008 2:27pm

Subscribe [2]
  • #1 / May 26, 2008 2:27pm

    Geof Harries

    109 posts

    When it comes to results, how “fair” is the order by random parameter? Does EE know what result was previously shown or for every page request, is it simply pulling anything out of the database? I ask because I’m using this parameter on a website whose accuracy of random results I’m (and the client) are starting to question.

  • #2 / May 26, 2008 2:46pm

    Mark Bowen

    12637 posts

    Hi Geof,

    I think I know what you mean on this one and unfortunately if you do use pagination ExpressionEngine doesn’t bring in any kind of memory to it so that when you go to page two you don’t see something you have seen before unfortunately. There is a feature request for something like this to be added in to the system though so perhaps if you explain over there why you need the feature then it may get added into the system.

    I think you would need to either pass in the entry ids that have already been shown and then take those out of the equation on the next page and so on and so forth. Not the easiest of things to implement though so I don’t think that there is an easy solution to this one I’m afraid.

    Would be nice to see it able to do this though.

    Best wishes,

    Mark

  • #3 / May 26, 2008 2:50pm

    Ingmar

    29245 posts

    So, is that a question or a feature request? 😊 EE uses a built-in MySQL function, ORDER BY RAND(). All randomness, as it were, is left to MySQL in this case. EE does not know (or care) about previous page requests.

  • #4 / May 26, 2008 2:58pm

    Geof Harries

    109 posts

    Mark - I’m not using pagination, simply rotating banner advertisements on content pages. As for passing the entry IDs, I like that idea. Could be tricky to build, but I may just end up trying.

    Ingmar - I mistakenly put this question in the wrong forum category. I had searched for similar results and just hit New Topic, sorry. If you want to move it somewhere else, feel free.

    [Moved to “General”]

  • #5 / May 26, 2008 3:01pm

    Mark Bowen

    12637 posts

    Hi Geof,

    Sorry I misread what you had said when you talked about page requests and thought that you may have been talking about pagination. When you say you are questioning the results you are getting what exactly are you seeing then?

    Best wishes,

    Mark

    EDIT - Ingmar your icon just changed!! What happened? Is that you this time or another member of your family?

  • #6 / May 26, 2008 3:05pm

    Ingmar

    29245 posts

    Ingmar your icon just changed!! What happened? Is that you this time or another member of your family?

    Well, can’t I change my avatar every now and then? 😊 Yes, that’s me this time.

  • #7 / May 26, 2008 3:38pm

    Mark Bowen

    12637 posts

    Of course you can change it. You just did it in between me posting and I thought that you had been hi-jacked 😉

    Geof any more info as to what you were hoping to see with the random results as opposed to what you are seeing?

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases