> 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.
In this sort of situation I have a Sort field, containing a four or five
digit textual number (padded with zeroes), so you'd get 0001, 0002, 0003
etc.
That way you can order them however you want
Now, to add in the "slot" functionality, make it 2 sets of numbers, so it'll
be 0001-0001, 0002-0001, 0002-0002, 0002-0003, 0003-0001
The first 4 digits is the "slot" and the second 4 are the "sort" - that way
you ORDER BY one field and still can read how it's meant to be displayed
HTH
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists