Answer the question
In order to leave comments, you need to log in
How correctly to select from the data from the middle of a DB?
Hello. There is a simple notes table for a mini-blog: id_author, header, text. And I need to find the second five records of the user who has id_author = 2 (for example).
That is, extract the first 10 records from the table. Then discard the first 5 and give the client only the second 5. What is the best way to do this?
Answer the question
In order to leave comments, you need to log in
There is a simple notes table for a mini-blog: id_author, header, text. And I need to find the second five user records
select header, text from notes where id_author = <автор> order by postdatetime limit 5, 5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question