등록된 내용이 없을때 메세지 등록된게 없다는 메세지 출력 정보
등록된 내용이 없을때 메세지 등록된게 없다는 메세지 출력본문
<?
$list_mod = $default[de_rel_list_mod];
$img_width = $default[de_rel_img_width];
$img_height = $default[de_rel_img_height];
$td_width = (int)(100 / $list_mod);
$sql = " select b.*
from $g4[yc4_item_relation_table] a
left join $g4[yc4_item_table] b on (a.it_id2=b.it_id)
where a.it_id = '$it[it_id]'
and b.it_use='1' ";
$result = sql_query($sql);
$num = @mysql_num_rows($result);
if ($num)
include "$g4[shop_path]/maintype21.inc.php";
else
echo "<div id='it_relation'><? display_type(1, 'maintype21.inc.php', 3, 1, 120, 120); ?>";echo "</div>";
echo "<div id='it_relation_no'>이 상품과 관련된 상품이 없습니다.</div>";
?>
등록된 상품이 있을때 <div id='it_relation'>관련상품</div>가오고
등록된 상품이 없을때는<div id='it_relation_no'>등록된 상품이 없지롱</div>가 나오게 하고싶은데요.
생각처럼 않되네요.
어떻게 해야 할까요.
도움좀 부탁합니다.
$list_mod = $default[de_rel_list_mod];
$img_width = $default[de_rel_img_width];
$img_height = $default[de_rel_img_height];
$td_width = (int)(100 / $list_mod);
$sql = " select b.*
from $g4[yc4_item_relation_table] a
left join $g4[yc4_item_table] b on (a.it_id2=b.it_id)
where a.it_id = '$it[it_id]'
and b.it_use='1' ";
$result = sql_query($sql);
$num = @mysql_num_rows($result);
if ($num)
include "$g4[shop_path]/maintype21.inc.php";
else
echo "<div id='it_relation'><? display_type(1, 'maintype21.inc.php', 3, 1, 120, 120); ?>";echo "</div>";
echo "<div id='it_relation_no'>이 상품과 관련된 상품이 없습니다.</div>";
?>
등록된 상품이 있을때 <div id='it_relation'>관련상품</div>가오고
등록된 상품이 없을때는<div id='it_relation_no'>등록된 상품이 없지롱</div>가 나오게 하고싶은데요.
생각처럼 않되네요.
어떻게 해야 할까요.
도움좀 부탁합니다.
댓글 전체
if ($num) {
include "$g4[shop_path]/maintype21.inc.php"; // 필요없으면 주석처리하심 됩니다~
?>
<div id='it_relation'><?=display_type(1, 'maintype21.inc.php', 3, 1, 120, 120); ?></div>
<? } else { ?>
<div id='it_relation_no'>이 상품과 관련된 상품이 없습니다.</div>
<? } ?>
include "$g4[shop_path]/maintype21.inc.php"; // 필요없으면 주석처리하심 됩니다~
?>
<div id='it_relation'><?=display_type(1, 'maintype21.inc.php', 3, 1, 120, 120); ?></div>
<? } else { ?>
<div id='it_relation_no'>이 상품과 관련된 상품이 없습니다.</div>
<? } ?>