Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL触发器连接字符串_Mysql_String_Triggers_Concatenation - Fatal编程技术网

MySQL触发器连接字符串

MySQL触发器连接字符串,mysql,string,triggers,concatenation,Mysql,String,Triggers,Concatenation,问题是当我试图设置CAD变量时 下面是我的示例代码: 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 试试这个它确实有效,这是正

问题是当我试图设置CAD变量时

下面是我的示例代码:

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

试试这个

它确实有效,这是正确的答案。康考特把弦聚在一起。
CONCAT("The user ", vUser, " add the jurisdiction ", NEW.name)