합계 구하기 채택완료
웹프리죤
5년 전
조회 2,600
위에는 목록이고 아래쪽엔 총계를 내는 테이블인데 아래쪽엔 같은 이름은 하나로 합치고
수량 하고 가격 또한 더해져야 되는데 어떻게 구문을 짜야 할까요

체리를 예로 든다면 한 줄로 나와야 겠죠
체리 1kg / 수량2 / 39,800
이런식으루요..
</p>
<p><?php
$sql = " select * from {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b where a.od_id = b.od_id and ".$whereClause." and od_status <> '취소' ";
$result3 = sql_query($sql);
for ($k=0; $row3=sql_fetch_array($result3); $k++) {
</p>
<p> ?>
<tr>
<td colspan="2" style="<?php echo $td; ?>" style="mso-number-format:\@"><?php echo $row3['it_name']; ?></td>
<td style="<?php echo $td; ?> text-align:right" style="mso-number-format:\@"><?php echo number_format($row3['ct_qty']); ?></td>
<td style="<?php echo $td; ?> text-align:right" style="mso-number-format:\@"><?php echo number_format($row3['ct_price']); ?></td>
</tr>
<? } ?></p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
답변을 작성하려면 로그인이 필요합니다.
로그인