어떤 부분에 문제가 있는 건가요?
DB 에는 값이 있으나, 출력이 되지 않습니다.
shop.lib.php
function get_color1($it_id)
{
global $g5;
$sql = "select count(is_color) as color1 from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' and is_color='6' ";
$row = sql_fetch($sql);
return (int)$row['color1'];
}
item.php
$color1 = get_color1($it['it_id']);
item.form.skin.php
<?php if ($color1) {
echo $color1?>명
<?php } ?>
답변 3개
채택된 답변
+20 포인트
답변을 작성하려면 로그인이 필요합니다.