Sorry, I know this might be off topic , more database design then Rails, but
I''d like to know if there are ways in Rails to make this easier.
On 10/5/06, Dark Ambient
<sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> As an example - you have a select list of all the U.S. states and the user
> can make multiple choices.
> How do you grab all those choices into the database and they would be used
> for queries.
> I was reading up on serialize() but the warning in AWDWR is that it
> doesn''t work well for queries. Also composites / aggragates seems
a bit
> much, maybe not.
>
> I know in the past I''ve used addtional tables as example.
>
> Tavels_table - id, user_id States_table - id, travel_id, state
> id,
> travel_id, state
> id,
> travel_id, state
>
> So if the user chose 3 states - each of the the 3 travel_id''s
above (in
> the States_table) would be the same and correspond to the id in the
> Travels_table.
> Almost makes you never want to offer multiple choice selects :).
>
> TIA
> Stuart
>
> --
> http://en.wikipedia.org/wiki/Dark_ambient
--
http://en.wikipedia.org/wiki/Dark_ambient
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---