Jules
The example given is to generate a list that the visitor can
sort using
Ajax, as opposed to your client wanting to dictate the list
order. In order
to change the number in the list you need to script it to
loop though each
record however i would limit this to the top 100 only because
I doubt that
anyone is going to be worried too much about the order of
items 500 down.
You can effect the whole change with a SQL statement like
this
Update table
Set productOrderNumber = (productOrderNumber + 1)
Where ID > varThisOrder
You would need to have two statement that are fired depending
upon where it
is an increase or a decrease in the number.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"Julesmg" <webforumsuser@macromedia.com> wrote in
message
news:f0t1sq$di8$1@forums.macromedia.com...
> Hi, any thoughts on this problem please? :o)
>
> I have a site where the customer needs to sort products
to appear in a
> numbered order. I have a productOrderNumber field in the
products table
> which
> does this but the problem I have, as I am sure other who
have done this
> will be
> aware, is that the customer wishes to frequently change
the product order
> by
> productOrderNumber.
>
> If i give them a form to change product 1 order number 1
to order number
> 2,
> that then means that i have to manually change product
number 2 to number
> three
> etc down the products. This database has 700 products!!
>
> Does anybody kown of a process that will address this or
is it logicallly
> just not possible?
>
> I have seen the following in PHP which 'may' help me.
But I would need an
> ASP
> version.
>
>
>
http://www.phpriot.com/d/articles/client-side/sortable-lists-with-php-and-ajax/i
> ndex.html
>
> Any ideas greatfully accepted.
>
> Thanks
>
> Jules xx
>
> ASP and MS Access db btw
>