[development] development Digest, Vol 97, Issue 54

Blaine Lang Blaine.Lang at nextide.ca
Mon Jan 24 04:28:02 UTC 2011

> I did that all the time in Drupal 6 using Views.  It's dead simple.
> random limit 1, done.)  I haven't tried doing it in Drupal 7, but I'm
> the same method still works.
> --Larry Garfield

Larry, that was my first option but kept getting errors returned in the
views UI and logged an issue.

Getting it to work using DBTNG was pretty straight forward and yes, I
used the orderRandom()

I wanted to use this as an exercise to get to know the EntityController
class better. Is it the random requirement that is making that difficult
- what if we remove the requirement and just want to return all the
records so that I loop thru them (I just need the body field)

More information about the development mailing list