I am new to using procedures and cannot seem to get mine working. I am using MySQL v5.1.36 and inputing my code using MySQL Console on a WAMPP server. If I go to (re)create the procedure. I get error #1304 (42000).
mysql> DELIMITER //
mysql>
mysql> CREATE PROCEDURE modx.getCRID (IN x VARCHAR(255),OUT y INT)
-> BEGIN
-> DECLARE y INT;
-> SELECT id INTO y
-> FROM `modx`.coverage_region
-> WHERE `coverage_region`.name = x;
-> END//
ERROR 1304 (42000): PROCEDURE getCRID already exists
mysql>
mysql> DELIMITER ;
However, if I try to use the procedure I get error #1305 (42000).
mysql> USE modx;
Database changed
mysql> SET @crID = modx.getCRID("South East");
ERROR 1305 (42000): FUNCTION modx.getCRID does not exist
If the procedure exists for one how can it not exist for the other? What am I doing wrong.