storing lists in mysql
Posted: Wed Dec 23, 2009 3:01 pm
hi. i have a table or two (albums, songs, etc) that will have a column that holds a list of artist id's.
now the way i am thinking about storing this list is by using serialized arrays. but what i want to know is if there is a more graceful way to handle this.
but i was also thinking i can create the list using mysql's string functions but then parsing it in php becomes more annoying.
i want to be able to index this column and i also want to be able to use string functions or regex to read id numbers from the list so someone can search for shtuff by artist.
im also wondering if i will be able to select the artist names and id's by using string functions and joins to get the information from the column.
work with things like this before?
now the way i am thinking about storing this list is by using serialized arrays. but what i want to know is if there is a more graceful way to handle this.
but i was also thinking i can create the list using mysql's string functions but then parsing it in php becomes more annoying.
i want to be able to index this column and i also want to be able to use string functions or regex to read id numbers from the list so someone can search for shtuff by artist.
im also wondering if i will be able to select the artist names and id's by using string functions and joins to get the information from the column.
work with things like this before?