Frage

I have tried changing it from DESC to RAND() and it doesn't work. It lets me change it to ASC and that works fine.

    $select = $photosTbl->select()
        ->where('contest_id=?', $this->getIdentity())
        ->order('votes DESC');

Thank you in advance.

War es hilfreich?

Lösung

->order('RAND()');

would likely do it. Not very nice to let the database do it

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top