<http://forum.pspad.com/read.php?f=2&i=11117&t=11117>
----------------------------------------------------------------
Hello,
Again on the topic of code explorers. I am seeing some strange behaviour
when using it with MySQL. If you use the following definition the name in
the code explorer comes up as IF for the Drop Procedure line and it
doesn't recognise the actual create procedure function.
If you want some more examples let me know and i can try to put something
together.
The example below is for MySQL 5.
Cheeers,
Simon
DELIMITER $$;
DROP PROCEDURE IF EXISTS `DNFI_EMAIL_DELETE`$$
CREATE PROCEDURE `DNFI_EMAIL_DELETE`(
IN ipEMAILID BIGINT,
OUT opEXCEPTION VARCHAR(50)
)
COMMENT ''
BEGIN
MAIN_BLOCK:
BEGIN
/* verify record exists */
IF (NOT EXISTS(SELECT ID FROM `DNFBB_EMAIL` WHERE ID = ipEMAILID)) THEN
SET opEXCEPTION = 'EXC_DNF_INVALID_EMAIL_ID';
LEAVE MAIN_BLOCK;
END IF;
DELETE FROM `DNFBB_EMAIL`
WHERE ID = ipEMAILID;
/* Notify listeners of deletion */
-- POST_EVENT 'delete_dnfbbemail_delete';
SET opEXCEPTION = '';
END;
END$$
DELIMITER ;$$
COMMIT;
--
PSPad freeware editor http://www.pspad.com