开发者

SQL Next/previous Assoc

So, I am writing a PHP script that needs to get the next assoc in the SQL Query, But It seems like I am writing lots of code for something that is probably in MySQL somewhere, I tryed开发者_如何学Go google but no luck.

Basically what I am doing is grabbing for a DB using this Query:

SELECT * FROM challenges WHERE subcat='%s' ORDER BY points, id ASC;

I am able to grab that value but I have a "next" button and Previous button I want to implement. I just do not know how in SQL I can do that instead of writing 15 lines of php to solve this.

Thanks for any help!


Google for keyword "pagination mysql php". You'd get a lot of tutorials teaching you how to do it...

All you need is limit keyword from mysql

[ I am assuming you are asking about pagination ]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜