Selecting next ID and less?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm working on a puzzle game, where users must solve many different puzzles. Once they complete a puzzle, they will be able to try the next puzzle. Each puzzle is stored as a row in the puzzle in a database table. The problem is, how would I select the puzzles the next highest puzzle and lower? I could use a query something like "select * from puzzles where id <= $completedid + 1", but it would break is there were any holes in the ID. Also, it would use the ID as something more than a unique identifier for each row, which is a bad thing. Any suggestions for a better way?


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux