gpt4 book ai didi

mysql - 1305 - 程序 db.delete_catelog_item 不存在

转载 作者:行者123 更新时间:2023-11-29 01:04:29 25 4
gpt4 key购买 nike

我刚刚在数据库 (name : db) 中创建了一个过程 (name : 'delete_catelog_item does') 并尝试运行该过程。然后我得到一个错误像这样 #1305 - PROCEDURE db.procedurename does not exist

我的查询

DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_catelog_item`(IN itemtocatid INT(11),IN shopinid INT(11),OUT out_put BOOL)
BEGIN
DECLARE cont INT(11);
DECLARE itemid INT(11) DEFAULT 0;
SELECT a.ItmId INTO itemid FROM mas_shop_item_to_category as a INNER JOIN mas_shop_item as b ON (a.ItmID=b.ItmID AND b.IsDelete!=1 AND b.ShopID IN (SELECT ShopID FROM mas_shop WHERE ShopID=shopinid OR ParentID=shopinid)) WHERE a.ItmToCatID=itemtocatid AND a.IsDelete!=1;
IF itemid!=0 THEN
UPDATE mas_shop_item_to_category SET `IsDelete` = '1' WHERE ItmToCatID=itemtocatid;
SELECT count(ItmToCatID) INTO cont FROM mas_shop_item_to_category WHERE ItmId=itemid AND IsDelete!=1;
IF cont=0 THEN
UPDATE mas_shop_item SET `IsDelete` = '1' WHERE ItmID=itemid;
END IF;
SET out_put=TRUE;
ELSE
SET out_put=FALSE;
END IF;
END //
DELIMITER ;


Apache/2.2.14 (Ubuntu)
MySQL client version: 5.1.41
PHP extension: mysql

我无法找出真正的原因,但当我检查我的数据库中的过程时,它就在那里。请帮忙找出问题所在。

谢谢。

最佳答案

从您提供的错误消息来看,您似乎试图通过名称 procedurenameCALL 您的过程,而您的CREATE PROCEDURE 语句将其命名为 delete_catelog_item。您需要通过定义它的名称CALL它!

关于mysql - 1305 - 程序 db.delete_catelog_item 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10351825/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com