소셜커머스 최신글을 만드는 과정에서
본문
여기에 보면 list.skin.php 파일안에 출력소스입니다
<!--<b>판매가격</b> :-->
<? if ($product[pr_use_point]) { ?>
<?=number_format($product[pr_sale_price])?> 포인트
<? if ($rate) { ?>
<s><?=number_format($product[pr_original_price])?> 포인트</s>
↓<?=mw_soc_rate($product[pr_original_price], $product[pr_sale_price])?>%
<? } ?>
<? } else { ?>
<?=$mw_cash[cf_cash_name]?>
<?=number_format($product[pr_sale_price])?> <?=$mw_cash[cf_cash_unit]?>
<? if ($rate) { ?>
<s><?=number_format($product[pr_original_price])?> <?=$mw_cash[cf_cash_unit]?></s>
↓<?=mw_soc_rate($product[pr_original_price], $product[pr_sale_price])?>%
<? } ?>
<? } ?>

위에 이미지처럼 출력되고 있는데요
이것을 최신글 latest.skin.php 파일에 박아두고 sql문을 제일상단
$product = sql_fetch("select * from {$mw_soc[product_table]} where bo_table = '{$bo_table}' and wr_id = '{$list[$i][wr_id]}'");
이렇게 날렸는데 오류가 나옵니다

답변 3
테이블정의가 안되어 잇어서 그냥 테이블명으로 뽑아야하지않을까요?
최신글이면......
$product = sql_fetch("select * from g4_mw_soc_product where bo_table = '{$bo_table}' and wr_id = '{$list[$i][wr_id]}'");

$product = sql_fetch("select * from g4_mw_soc_product where bo_table = '$bo_table' and wr_id = '{$list[$i]['wr_id']}'");
wr_id 에 콤마도 찍어보세요......
답변을 작성하시기 전에 로그인 해주세요.