[thelist] record sorting problem

john corry john at neoncowboy.com
Thu Jun 21 12:33:28 CDT 2001


Mayb you guys can help with this...

I have a small database of images online at http://www.dianalehr.com

The images are divided into categories based on the artwork's medium, on the
index page. To view the enlargement, a user clicks a thumbnail...the link
looks like <a href="detail.php?id=4">. On the detail page there are links to
the next and previous pieces in the database. Those links are derived by
adding or subtracting 1 to/from the current id (with a special if statement
built in for the first and last records).

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...

It just dawned on me that what I am probably going to want to do is to leave
the logic alone, and just add a column to the DB that puts the pieces in the
order I want them in...

any comments?
john





More information about the thelist mailing list