In message <[EMAIL PROTECTED]>, whoisquilty
<[EMAIL PROTECTED]> writes
>Maybe I'm phrasing the question wrong.
>
>I want a Next link and a Previous link. Each linking to either the next row in 
>the sorted 
>sequence or the previous row.
>
>How would I do that?

I am not trying to be pedantic, but you haven't said what you are doing
yet!  Are your records in MySQL?  Are you linking to the previous / next
pages, with one picture on each page? 

When you display a page, that's it, that's all you get.  You can't click
on a link, and show another item, without refreshing the page, unless
you are going to use some fancy Ajax code.

As the most likely scenario is one pic per page, data in MySQL, then it
would be covered by the SQL command that I posted here in another
thread, a UNION.

(SELECT picID FROM pictures WHERE <whatever filtering you have in place>
ORDER BY picID DESC LIMIT 1) 
UNION 
(SELECT picID FROM pictures WHERE <whatever filtering you have in place>
ORDER BY picID ASC LIMIT 1) 
ORDER BY picID DESC;

You will get two records, one with the ID of the previous picture in the
sequence, one with the ID of the next picture in the sequence.

If that isn't what you are looking for, give us an example of what you
have now, for a starting point.

-- 
Pete Clark

Sunny Andalucia
http://www.hotcosta.com/comm_1.htm

Reply via email to