잘못된 상품 위시리스트 집계 쿼리문 수정

This commit is contained in:
thisgun
2019-04-03 14:57:23 +09:00
parent f2112a72f8
commit 880fd92426

View File

@ -2234,7 +2234,10 @@ function get_wishlist_count_by_item($it_id='')
{
global $g5;
$sql = "select count(a.it_id) as num from {$g5['g5_shop_wish_table']} a, {$g5['g5_shop_item_table']} b where a.it_id = b.it_id";
if( !$it_id ) return 0;
$sql = "select count(a.it_id) as num from {$g5['g5_shop_wish_table']} a, {$g5['g5_shop_item_table']} b where a.it_id = b.it_id and b.it_id = '$it_id'";
$row = sql_fetch($sql);
return (int) $row['num'];