'$it_id' and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) order by ca_id, it_name "; $result = sql_query($sql); $list = ''; for($i=0;$row=sql_fetch_array($result);$i++) { $sql2 = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' and it_id2 = '{$row['it_id']}' "; $row2 = sql_fetch($sql2); if ($row2['cnt']) continue; $it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name']; $list .= '
  • '; $list .= ''; $list .= $it_name; $list .= ''; $list .= '
  • '.PHP_EOL; } if($list) $list = ''; else $list = '

    등록된 상품이 없습니다.'; echo $list; ?>