Any hint on what those SQL statements might be? Something like UPDATE *
WHERE position > N ... then... I'm not so good at procedural SQL. Maybe you
were saying you'd get all the records higher than N, then loop through and
increment the position?

On Thu, Oct 2, 2008 at 4:35 PM, DyingToLearn <[EMAIL PROTECTED]> wrote:

>
> Sean Clark Hess wrote:
> > I've thought of including a field called "order" or something, but then
> I'd
> > have to update every single one when I change the order.
>
> You can update them all with just 2-3 SQL statements, so it doesn't
> have be to a performance concern. I've done this several times.
>
> Side note: I think "position" is the more commond name for a column
> like this, at least within Rails apps.
>
> HTH
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to