Hi guys i have a query for example
SELECT
p.id
, p.name
, p.description
,MAX(IF(pa.fieldname = 'size', pa.fieldvalue, NULL)) as `size`
,MAX(IF(pa.fieldname = 'height', pa.fieldvalue, NULL)) as `height`
,MAX(IF(pa.fieldname = 'color', pa.fieldvalue, NULL)) as `color`
FROM product p
LEFT JOIN product_additional AS pa ON p.id = pa.id
GROUP BY p.id
I am getting the result correctly , but I have a condition where I have to apply conditions for size, for example (size in ('medium', 'large', 'small')) but I am getting error like unknown column size can anyone help me here