I have a table with lots of different columns, like
resolution, brightness, type, width, camera_type, projection_type etc
I need to get the names of only those columns, that are relevant to, say LED tv’s to build filters, – which means I need to somehow
SHOW COLUMNS FROM Goods WHERE category_id = 5 AND [there is at least one value in the column for a row that meets the category_id = 5 condition]
Is it even possible?
I’m guessing what you want is the column names that have a non-null value where category_id = 5. The difficulty here is finding out which columns have a non-null value where category_id = 5. This will have to be accomplished on a per column basis but can be done.
To be honest… I don’t work in MySql but I’m certain you can follow along and make any adjustments needed.