Im trying to return with in a range given a variance number in a field but i also need if more then 5 returns pick the 2 above and 2 below my number im searching for.
i have tried (target 2000 sqr_ft)
SELECT * FROM `property_data` WHERE `Bldg_Sq_Ft` BETWEEN "1800" AND "2200" ORDER BY ABS(`Bldg_Sq_Ft`), `Bldg_Sq_Ft`
SELECT * FROM `property_data` WHERE `Bldg_Sq_Ft` >= "1999" AND `Bldg_Sq_Ft` <="2659" ORDER BY `Bldg_Sq_Ft`
this does not seam to be a good way of getting range of numbers is this the proper way to do this?
how do i return if i get more then 5 i can get the records 1&2 below and 1&2 above my target search?
Thank you for any code or help you may provide,