[thelist] record sorting problem

noah noah at tookish.net
Thu Jun 21 23:53:11 CDT 2001


At 01:32 PM 21/06/2001, john corry wrote:
>The Problem:
>I have to make the next/previous links cycle through the rows in the same
>order as on the index page...meaning, if you view an oil's enlargement, next
>goes to the next oil ansd so on, until there are no more oils..then next
>goes to the first pastel, and so on...

Not sure if this is any good to you. Also, I could be completely wrong, in 
which case I'm sure someone will straighten me out. Having said that . . .

It seems like it will be tough to order the images if you're pulling them 
from the db one at a time - in order for them to show up and link the way 
you want them to, I think that the script has to know where the current 
image is in the database in reference to the others.

I achieve something similar to what you want by actually pulling all of the 
appropriate images from the database in one query, and then spreading the 
results over a number of pages (with one result per page). This way there 
is a recordset that has a handle on how the images should be sorted. Of 
course, how the images should be sorted still has to be specified in the 
database.

HTH, cheers,

Noah





More information about the thelist mailing list