If I have a mysql table which had primary ids and another field called gameScore can I do something along the lines of...
SELECT gameScore FROM table1 WHERE id =
Something like this -
SELECT t1.* FROM table1 t1
JOIN (
SELECT id, MAX(gameScore) gameScore FROM table1
WHERE id = 100 AND gameScore < 50 ORDER BY gameScore
) t2
On t1.id = t2.id AND t1.gameScore = t2.gameScore
To find previous record we need to select exact current record, in example it is a record with id = 100 and gameScore = 50.