Hi,

Could you create a linked list of the links- i.e. have a 'Next' field,
which contains the ID of the next URL in order. You will also need a
field to store if the link is the first (i.e. root) of the list. Then
you can just iterate though the rows, using the next field to tell you
which URL is next. To add or delete will only require one or two changes

It might be a bit overkill if the list of URLs is quite small, but it
will scale up to any size

Regards

Dave Rigby

On 07 Aug 2001 02:35:26 -0600, Healthwell.com wrote:
> 
> I have a general "how do you do that" SQL question.
> 
> I have a table with links in it.  One link per row, with URL link name, etc.
> 
> The client wants to be able to specify the order in which the links appear.
> In other words, they want to set any link to show up first, another other
> link to show up second, etc, etc.
> 
> I did a rough think like this a while back, by allowing then to set a
> "precedent" field, than the sorted on that field.  The trick is, of course,
> if they ad a link and want it to show up in the second slot, then the
> "precedence" filed for records higher then 2 need to be incremented by one,
> so the sequence will still be in tack.
> 
> I'm thinking there must be a better way to do this, but I don't know what it
> is.
> 
> Thanks in advance,
> 
> Peter Janett
> 
> New Media One Web Services
> ================================
> WEB HOSTING FOR WEB DEVELOPERS
> ================================
> Sun, IRIX, Windows 2000, Linux;
> PHP, MySQL, Perl, Cold Fusion,
> MS SQL, ASP, SSI, SSL
> http://www.newmediaone.net
> [EMAIL PROTECTED]
> (303)828-9882
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
-- 
Dave Rigby

Opal Telecom

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to