如果我要取11-20 的Account表的数据 Select * From Account Limit 10 Offset 10; 以上语句表示从Account表获取数据,跳过10行,取10行 嗯,我觉得这个特性足够让很多的web中型网站使用这个了。 通用公试: sql = "select * from FlyCrocodile where "+条件+" order by "+排序+" limit "+要显示多少条记录+" offset "+跳过多少条记录; 如: select * from flycrocodile limit 15 offset 20 意思是说: 从flycrocodile表跳过20条记录选出15条记录
select id,lbid2, siteid,title ,rq from Chem99Mobile_news where title like '%ABS%' order by id desc limit 10 offset 0 --前10条
select id,lbid2, siteid,title ,rq from Chem99Mobile_news where title like '%ABS%' order by id desc limit 10 offset 10 --11条-20条
select id,lbid2, siteid,title ,rq from Chem99Mobile_news where title like '%ABS%' order by id desc limit 10 offset 20 --21条 -30条