브랜드 상품
브랜드 상품보기
찜하기
  • select c1_uid,c1_name from ( select c.c_uid as c3_uid, c2.c_uid as c2_uid, c1.c_uid as c1_uid, c.c_name as c3_name , c2.c_name as c2_name , c1.c_name as c1_name from smart_product_category as pct left join smart_product as p on (p.p_code = pct.pct_pcode) left join smart_category as c on (c.c_uid = pct.pct_cuid and c.c_depth=3) left join smart_category as c2 on (c2.c_uid = substring_index( substring_index( (select concat(c_parent,',',c_uid) from smart_category where c_uid = pct.pct_cuid) , ',' ,2) , ',' ,-1) and c2.c_depth=2) left join smart_category as c1 on (c1.c_uid = substring_index( substring_index( (select if(c_parent>0, concat(c_parent,',',c_uid), c_uid) from smart_category where c_uid = pct.pct_cuid) , ',' ,1) , ',' ,-1) and c1.c_depth=1) where pct.pct_pcode in (SELECT p_code FROM maramall.smart_product where p_brand=) and c1.c_name is not null group by c1_uid,c2_uid,c3_uid order by c1_uid,c2_uid,c3_uid asc ) as t group by c1_uid,c1_name order by c1_name asc
    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') and c1.c_name is not null group by c1_uid,c2_uid,c3_uid order by c1_uid,c...' at line 17
    1064