문제

I try to get two varchar into one with a mysql Stored Functions?

Like with php ($ var1. $ var2) or javascript´s (var1 + var2)

It does not seem that it works with plus(p_email+p_password).

DELIMITER $$

DROP FUNCTION IF EXISTS `voidcod_eventgroup`.`dummy`$$
CREATE FUNCTION `voidcod_eventgroup`.`dummy` (
     p_email VARCHAR(300),
     p_password VARCHAR(16)
) RETURNS VARCHAR(316)
BEGIN
     /* this only returns p_password NOT p_email*/
     RETURN p_email+p_password;

END$$
DELIMITER ;

Greeting Voidcode.

도움이 되었습니까?

해결책

You could try to use CONCAT, haven't tried it for this kinda stuff though :)

CONCAT(p_email, p_password);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top