Hi i have a mysql table called artists.
here’s the structure:
[TABLE=“class: grid, width: 500”]
[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Son Capson[/TD]
[TD]Musician[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Aeron[/TD]
[TD]Musician,Photographer[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Simon Lovatt[/TD]
[TD]Sound Engineer[/TD]
[/TR]
[/TABLE]
On my artist page I have it set up so that you can filter by type using ‘artists.php?type=’
But to make it easier for users I want to be able to display all the types with their relevant links such as…
<a href="artists.php?type=<? echo $type; ?><? echo $type; ?></a>
I can do this, using a select query however I want to be able to prevent repeated types and explode types with more than one value such as number 2 in the table.
I’ve tried searching but can’t find anything that similar to this, I thought it would be a more common problem. I have a very basic understanding of php so any advice is greatly appreciated.
I guess this could be compared to a tag system in a blog, yet still I can’t find the answer to my problem. Thanks in advance.
Nick Warren