Ver originalDELIMITER $$DROP PROCEDURE IF EXISTS setRegistrados$$CREATE PROCEDURE setRegistrados(IN nom VARCHAR(120),IN email VARCHAR(120),IN cel VARCHAR(10), OUT id INT)BEGIN INSERT INTO registrados (regnom,regemail,regcel) VALUES (nom,email,cel); SET id = LAST_ISERT_ID();END$$DELIMITER;
Ver originalDELIMITER $$CREATE FUNCTION getRegistrados(nom VARCHAR(120),email VARCHAR(120),cel VARCHAR(10)) RETURNS INTBEGIN DECLARE ide INT DEFAULT 1; CALL setRegistrados(nom,email,cel, ide); RETURN ide;END$$DELIMITER;