Jump to content

[SOLVED] Find highest number in field


lupld

Recommended Posts

eh, simple question I know, but it takes a while for new things to stick, and the library's closed on Sunday's... I need to look up 30 entries from a given number in a mysql query, the catch is, if it hits 1 I need it to jump to the highest number in the database, or if it hits the highest number then it goes to 1... I'm using a while loop to display the information... any ideas? btw, I'm making a quiz, and pulling questions out of a database by an id that auto increments...

Link to comment
https://forums.phpfreaks.com/topic/74240-solved-find-highest-number-in-field/
Share on other sites

K, thanks, that should work... as a side note, I'm still marking this as complete, but do you know an easy way to keep from getting the same question twice? I've thought through a few complex methods, but none that seem rational for a proper code, just a few noobish work arounds...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.