vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| SELECT name FROM `table` ORDER BY ABS( `age` -43 ) ASC LIMIT 1 Of course, this doesn't account for ties. To do that I guess you could have this query as a subquery and then LEFT JOIN where age = 43 +/- difference, but I'll leave that as an exercise for the reader. |