Sure - have a table called userPreferences with two columns, userID and
songID. Both are pointers to other tables (a user table and a song
table). So if user 111 picks songs 002, 004, and 006, you would have
three rows stored:

useriD          songID
------------------------
111                     002
111                     004
111                     006

So to get the user's preferred songs, you just select where userid = the
current userid.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Paul Campano [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 17, 2003 8:52 AM
> To: CF-Talk
> Subject: Best way to store 40 values?
> 
> 
> I have a database of approx 10000 songs.  I want users to be 
> able to choose 40 of them (probably using checkboxes via a 
> form) and save their preference of these songs to a database. 
>  I guess I could always make 40 database fields named song1, 
> song2, song3....., but I figured there must be a better way 
> than that.  Any suggestions?  Thanks.
> 
> 
> Paul
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to