From 880fd92426fef5915405066099ac17f7a7999b0b Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 3 Apr 2019 14:57:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20=EC=83=81?= =?UTF-8?q?=ED=92=88=20=EC=9C=84=EC=8B=9C=EB=A6=AC=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=A7=91=EA=B3=84=20=EC=BF=BC=EB=A6=AC=EB=AC=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 28dc7a8fb..96cb02c1d 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -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'];