From: edward Date: Fri, 11 May 2018 05:28:47 +0000 (+0800) Subject: mysql/core_images_count.sql X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=0c3314391588b1556e14be8831f9050c61ee0fbf mysql/core_images_count.sql --- 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;