Pull heirarchy data

admin

Administrator
Staff member
I have 2 tables currently.

link_category
- unq_row_id
- cat_name

link_category_lookup
- cat_list


unq_row_id is a auto increment integer
cat_name is a name of a category
cat_list is a string consiting of unq_row_id


As an example:
cat_list = "|1|2|3|4|"

each of those numbers represents within cat_list is equal to the corresponding unq_row_id within link_category.

What's the eastiest way to get this to correlate?

Obvisouly, I could pull the data row by row, explode the numbers at the "|", then do another select on where the cat_name is equal to the exploded array, but is there any other way to pull this data?
 
Back
Top