From 0c3314391588b1556e14be8831f9050c61ee0fbf Mon Sep 17 00:00:00 2001 From: edward Date: Fri, 11 May 2018 13:28:47 +0800 Subject: [PATCH] mysql/core_images_count.sql --- mysql/core_images_count.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/core_images_count.sql b/mysql/core_images_count.sql index 83b1cb82..d77fffdd 100644 --- a/mysql/core_images_count.sql +++ b/mysql/core_images_count.sql @@ -11,7 +11,7 @@ RETURNS INT(4) NOT DETERMINISTIC READS SQL DATA DECLARE v_ret INT(4); - SELECT COUNT(id) INTO v_ret FROM Images WHERE ontable = in_ontable AND onid = in_onid; + SELECT COUNT(id) INTO v_ret FROM Images WHERE ontable = in_ontable AND onid = in_onid AND is_deleted = 0; RETURN v_ret; -- 2.39.2