I have a table with 9 rows.
$ ID = 5
If I use SELECT * FROM tbl WHERE id>=$id, I get 5,6,7,8,9 lines. To this query, I want to add the result SELECT * FROM tbl WHERE id<$idto get the final rows 5,6,7,8,9,1,2,3,4.
This is to avoid two times in the database, and then add the result set to php.
EDIT: Yes, order is important. Thanks guys for the quick reply. Thanks to @knittl (Accepted answer) and @Swanand for the best answers.
Alqin source
share