Suppose there is a table with a "title" column and the following entries:
id title 1 Заголовок 4 2 Заголовок 2 3 Заголовок 1 4 Заголовок 3
Type of required sorting: alphabetically (title field).
Tell me, is it possible to get "previous" and "next" records with the help of requests, i.e. for "header 2" the previous one will be the record "header 1", and the next one will be the record "header 3"?
I see one way to do full requests:
SELECT * FROM table ORDER BY title
get an array of this sample and then in PHP find the current header and get the previous / next element of the array.