要想从MYSQL随机抽取数据库里的几条数据,我们就须要用到Rand()函数,该函数配合order BY语句可以实现该功能。
select * from table order by rank() limit 5;
written by admin \\ tags: mysql, php
Name (required)
Mail (will not be published) (required)
Website
最新评论