2014-11-24 32 views
1

問題是當我試圖設置CAD變量!MySQL觸發串接字符串

我怎樣才能得到串聯這裏是我的示例代碼:

BEGIN 
    DECLARE vUser varchar(50); 

    set @cad: = "The user "+ vUser+ " add the jurisdiction "+ NEW.name; 


    INSERT INTO ActivyLog 
    VALUES 
    (null,'Jurisdiction added', @cad, now(), now(), '1' , '1'); 

END 

回答

2
CONCAT("The user ", vUser, " add the jurisdiction ", NEW.name) 

試試這個

+0

測試ATM! W8。 – 2014-11-24 18:01:12

+0

什麼? ATM? w8 – ashkufaraz 2014-11-24 18:01:55

+0

一瞬間!..不工作:/ – 2014-11-24 18:02:56