문제

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.

도움이 되었습니까?

해결책

->order('RAND()');

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top