标签: php mysql
我试过这个但没有用。
$getPerson = mysqli_query($con,"SELECT * FROM Persons LIMIT 0,15"); shuffle($getPerson)//how to set limit for this?
答案 0 :(得分:1)
您可以将ORDER BY RAND()与LIMIT 0,4
ORDER BY RAND()
LIMIT 0,4
SELECT * FROM Persons ORDER BY rand() LIMIT 0,4