Hvis likes er unikke tal, burde følgende virke.
forrige:
SELECT * FROM table WHERE likes < (SELECT likes FROM table WHERE id = ID) ORDER BY likes DESC LIMIT 1
næste:
SELECT * FROM table WHERE likes > (SELECT likes FROM table WHERE id = ID) ORDER BY likes ASC LIMIT 1
Du kan ændre 1 af dem til <=eller>=og tilføje WHERE id != ID