한개의 컬럼에서 여러값을 불러오기가 안되네요? 채택완료
</p><p>function get_size($it_id)
{
global $g5;</p><p> $sql1 = "select count(is_size) as cnt1 from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' & is_size = 0";
$sql2 = "select count(is_size) as cnt2 from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' & is_size = 1";
$row1 = sql_fetch($sql1);
$row2 = sql_fetch($sql2);</p><p> return $row1;
return $row2;
}</p><p> </p><p>$size1 = get_size(stripslashes($row1['it_id']));
$size2 = get_size(stripslashes($row2['it_id']));</p><p> </p><p>echo $size1['cnt1'];
echo $size2['cnt2'];
답변 3개
</strong><span style="font-size: 10pt; line-height: 1.5;"></span><span style="font-size: 10pt; line-height: 1.5;">function get_size($it_id)</span></p><p>{</p><p> global $g5;</p><p> $sql1 = "select count(is_size) as cnt1 from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' & is_size = 0";</p><p> $sql2 = "select count(is_size) as cnt2 from {$g5['g5_shop_item_use_table']} where it_id = '$it_id' & is_size = 1";</p><p> $row1['cnt1'] = sql_fetch($sql1);</p><p> $row1['cnt2'] = sql_fetch($sql2);</p><p> return $row1;</p><p>}</p><p> </p><p>$size1 = get_size(stripslashes($row1['it_id']));</p><p>$size2 = get_size(stripslashes($row2['it_id']));</p><p> </p><p>echo $size1['cnt1'];</p><p><span style="font-size: 10pt; line-height: 1.5;">echo $size2['cnt2']; </span></p><p><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.6000003814697px; background-color: rgb(255, 255, 255);">
이렇게 해보시죠
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인