Hello, I am sure this will have been covered many times, I have searched quite a bit but I am not sure how to word what it is I am looking for, sorry!
I have a database listing cats (Bill, Bob, Tabatha, etc).
Each cat's could have multiple behaviour traits (Sleepy, Active, Inquisitive, etc).
So as I don't want to have a behaviour column storing an array, I create another table with column names for each type of behaviour. Cat Bill gets a row in the new table with either 1 or 0 to identify whether he has each behaviour type.
However, on my page I want to create a dropdown which will show all used behaviour types but I have no idea how to do this. So:
Bill: Sleepy
Bob: Sleepy, Inquisitive
Tabitha: Inquisitive
The drop down should show Sleepy and Inquisitive but not Active.
Any help would be very much appreciated!
Thank you