Is there any possibility to make an MySQL statement to select the number if it is less than some value? Lets say I have a php variable: myvar = 123;
And I have some records in database: 120 125 129 121
I want to take all possible database records, where myvar and record difference is less than 5. In this example, it would take 120, 125 and 121. Is it possible to do this? If yes, maybe someone could help me out how?