I have a table with a value column. I need to select the line chosen by the user (on the front), one line above and one line below, so:
My 'orders' table rows
----------------------------------------------
id | price |
----------------------------------------------
1 | 1500.00 |
2 | 1380.00 |
3 | 1880.00 |
4 | 1900.00 |
5 | 1450.00 |
6 | 1700.00 |
If the person chose: 1450.00, I want to bring 1450.00, 1380.00 and 1500.00. Is it possible to make this MySql select? or will i have to do this in php?
I only have the initial query for now:
SELECT * FROM `orders`
ORDER BY price;