yeah i now
<cfset sortOrder = 1>
<cfloop list="#form.items#" index="i">
<cfquery>
UPDATE Table
SET sortOrder = #Val(sortOrder)#
WHERE ItemID = #i#
</cfquery>
<cfset sortOrder = sortOrder + 1>
</cfloop>
This way you can shuffle the items around in the select box and reorder them
with the update
Steve
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jason
Sheedy
Sent: Thursday, April 14, 2005 1:23 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: ordering records by priority
On 4/14/05, Steve Onnis <[EMAIL PROTECTED]> wrote:
> you could use a select box with some buttons to move the items up and
down,
> then use the position in the list when it gets submitted to re order your
> items
Hi Steve,
I probably wasn't very clear in my description because I didn't go
into the actual method of displaying it, but that's kind of what I'm
doing. I just have 4 buttons on each item, (top,up,down,bottom).
My question was more to do with the method of storing the priority to
make it more efficient in terms of database access. I don't want to
have to update every record every time I change the priority on an
item.
--
Jason Sheedy
www.jmpj.net
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/