01-25-2008, 06:26 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Jul 2005
Location: UK
Posts: 121
Thanks: 41
|
Adding data - more than one piece in a column?
Hi All
I was just wondering what the best way of doing this would be.
Say I had a database of Actors (each one gets an id as the primary key in the actors table: So would be Actor_id, First Name, Last Name, etc).
Then say I had a page of info (say a movie info page) and I wanted to list the cast on that page. Would I simply have a column called 'actors', then just put the actor_ids in there seperated by commas?
Eg:
Actors: 124,366,697,125,123
But how would I retrieve their names on the page when it is shows to users? I guess I need the select query to know that the comma acts as a marker of sorts?
For a real life example take a look at this page: Play.com (UK) : Spider-Man 1, 2 And 3 (Blu-ray) : Blu-ray - Free Delivery towards the bottom under technical details it lists the actors.
I know it's probably a really simple silly nube question! (Sorry!) Appreciate your help!
__________________
PS3 Forums on GameSlurp - the site for gaming fans!
|
|
|
|