Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.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_Variables_Concat - Fatal编程技术网

根据函数-MySQL的结果设置变量的值

根据函数-MySQL的结果设置变量的值,mysql,variables,concat,Mysql,Variables,Concat,我有一个疑问-: 设置@var=;从dict中选择*,其中checkword='yes' 当checkWord函数的结果不是“yes”时,即当其为“no”时,我希望将发送到该函数的word值转换为@var的现有值 例如-: 如果checkword='no',则@var=CONCAT@var",","字, 应该做到这一点: SELECT group_concat(word) into @var FROM dict WHERE checkWord(word) = 'yes';

我有一个疑问-: 设置@var=;从dict中选择*,其中checkword='yes'

当checkWord函数的结果不是“yes”时,即当其为“no”时,我希望将发送到该函数的word值转换为@var的现有值

例如-: 如果checkword='no',则@var=CONCAT@var",","字,

应该做到这一点:

SELECT group_concat(word) into @var FROM dict WHERE checkWord(word) = 'yes';