I am trying to generate a list of elements :
- red
- green
- orange
- blue
- yellow+
In that case orange is selected and I have the two elements before and the two elements after.
How can I get this list from a MySQL query?
An example of a table :
5 – A
1 – B
4 – C
8 – D
7 – E
9 – F
3 – G
I finally did it with an application code :
The answer is that MySQL is not good to handle that, so it is more flexible to do it in the application.