Created
December 23, 2018 16:09
-
-
Save Kcko/96984372a62ef2968b55907d04b937f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT a.id AS nejblizsi_nizsi, b.id AS nejblizsi_vyssi | |
FROM `tabulka` a JOIN `tabulka` b ON (a.id < $id AND b.id>$id) | |
ORDER BY (b.id-a.id) ASC LIMIT 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment