[英]Query is Related to Mysql Records and fetch few of them
I have 10 Records in my database and I want 5 records from it. 我的数据库中有10条记录,我希望从中获得5条记录。
Like 1,2,3,4,5,6,7,8,9,10
and I want records from 3,4,5,6,7,8
像
1,2,3,4,5,6,7,8,9,10
一样,我想从3,4,5,6,7,8
记录
Records are dynamic and can change very frequently. 记录是动态的,并且可以非常频繁地更改。
Select *
From file
Where file_status = 1
Order By file_date DESC
limit 5
This Won't work, just because this will fetch only last five records.. 这将行不通,仅因为这将仅获取最后五个记录。
select * from file where file_status = 1 order by file_date DESC limit 2,6
将作为您的示例获取数据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.