I am using mySQL and CodeIgniter. I have some floating point numbers in my database such as
mySQL
CodeIgniter
Try this:
SELECT *,abs((columnname -Yourvalue)) as near FROM table WHERE order by near limit 0,1