DROP PROCEDURE IF EXISTS `update_user_phone_number`;
DELIMITER ;;
CREATE PROCEDURE `update_user_phone_number` (
    IN p_phone_number CHAR(11),
    IN p_user_id INT,
    OUT p_status INT
)
proc:BEGIN
    IF p_phone_number = '' OR p_phone_number IS NULL THEN
        SET p_status = -1;
        LEAVE proc;
    END IF;
    UPDATE users SET phone_number = p_phone_number WHERE id = p_user_id;
    SET p_status = 0;
END ;;
DELIMITER ;
