I want to Find the nearest numeric match in a database to what a user has inputed in php. The Database value can be multipled with an integer to find the near value to user Input.
For Ex: Database has the following Pallets:
950, 900, 1070
User Input a Value: 2000
Not the System should check:
950 * 2 = 1900
900 *2 = 1800
1070 * 2 = 2140
So the nearest value to 2000 is 1900. Any Help will be appreciated.