Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我如何让它产生随机结果而不是下降?_Php_Socialengine - Fatal编程技术网

Php 我如何让它产生随机结果而不是下降?

Php 我如何让它产生随机结果而不是下降?,php,socialengine,Php,Socialengine,我试着将它从DESC改为RAND(),但它不起作用。 它让我把它改成ASC,效果很好 $select = $photosTbl->select() ->where('contest_id=?', $this->getIdentity()) ->order('votes DESC'); 提前谢谢。->订购('RAND()') 我很可能会这么做。让数据库来做不是很好谢谢,它只是一个非常小的表,我看不出速度有什么问题。再次感谢!

我试着将它从DESC改为RAND(),但它不起作用。 它让我把它改成ASC,效果很好

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

->订购('RAND()')


我很可能会这么做。让数据库来做不是很好

谢谢,它只是一个非常小的表,我看不出速度有什么问题。再次感谢!