I'll try and describe this question as best that I can, if you need more information please let me know and I'll try and give it to you.
I have a database that has a couple of tables set up. The first table looks something like this.
| item_id | item_name | item_properties |
item_properties is a set from 1 to 52
I have a second table that looks something like:
| property_id | property_name |
property_id is a value from 1 to 52 and each one is unique
Basically what I want to do is select an item from the first table, which may have more than one property but have the property names show up instead of the value that is in item_properties.
So basically the result would look like
| item_id | item_name | property_name 1, ... , property_name n|
I know that I can do it a couple of different ways. I have used str_replace but that is a pain, especially as I go to add more properties to the second table and I have also used a second query. I was hoping that there might be a way to get it all done in one simple query.
Like I said, if this is confusing please let me know and I will do my best to explain it in a little more detail. Thanks for the help.