finding next and previous db entries

From: Date: Thu, 05 Sep 2002 21:20:08 +0000
Subject: finding next and previous db entries
Groups: php.general 
Request: Send a blank email to php-general+get-115278@lists.php.net to get a copy of this message
hey all, if im displaying pages with data from a database eg www.domain.com/file.php?id=40 on that page i would like to have a previous and next link that would take it to id 41 and 39 respectively, the only problem being what if 39 or 41 was empty? then i would want the link to be id=42 or id=38.. is the best way to do this just loop through the id's until it finds a entry that isnt empty? or is there any functions for this? jo

« previous php.general (#115278) next »