Taylor_1978
02-16-2005, 11:33 AM
Hiya,
I have seen this done before, but not quite sure exactly how to implement it.
In a HTML Form, I have the users choose at least one age group. The values are 1,2,3,4,5,6 and 7. The user selects from a multiple select box so they can choose more than one option.
I want these multiple options stored in the one field, so it may look something like this: 1, 2, 7.
I need to know how I actually go about this and then how I seperate/split it when retrieving. For example: If I do a search:
mysql_query("SELECT * FROM teams WHERE age=1")
That the rows that have the value of say:
1. 1,2
2. 1,5,6
3. 5,7
4. 1
Rows 1 2 and 4 will be retrieved because they have 1 in them.
Any suggestions would be greatly appreciated.
Thanks in advance! :thumbsup:
Taylor.
I have seen this done before, but not quite sure exactly how to implement it.
In a HTML Form, I have the users choose at least one age group. The values are 1,2,3,4,5,6 and 7. The user selects from a multiple select box so they can choose more than one option.
I want these multiple options stored in the one field, so it may look something like this: 1, 2, 7.
I need to know how I actually go about this and then how I seperate/split it when retrieving. For example: If I do a search:
mysql_query("SELECT * FROM teams WHERE age=1")
That the rows that have the value of say:
1. 1,2
2. 1,5,6
3. 5,7
4. 1
Rows 1 2 and 4 will be retrieved because they have 1 in them.
Any suggestions would be greatly appreciated.
Thanks in advance! :thumbsup:
Taylor.