0

如何从下面的 mysql 结果中提取值“Al Hidaya center”,我通常应该从 mysql 查询中得到“Al Hidaya center”,但是我也得到了这个 mambo jumbo 的结果。

我尝试了以下msg.payload[3]但这只会给我

[ { "device_name": "Al Hidaya 中心" } ]

mysql导致nodered mysql节点:

{“fieldCount”:0,“affectedRows”:0,“insertId”:0,“serverStatus”:10,“warningCount”:0,“message”:“”,“protocol41”:true,“changedRows”:0} ,{“fieldCount”:0,“affectedRows”:0,“insertId”:0,“serverStatus”:10,“warningCount”:0,“message”:“”,“protocol41”:true,“changedRows”:0 },{“fieldCount”:0,“affectedRows”:0,“insertId”:0,“serverStatus”:10,“warningCount”:0,“message”:“\u0012Statement Prepared”,“protocol41”:true,“ changedRows": 0 }, [ { "device_name": "Al Hidaya center" } ], { "fieldCount": 0, "受影响的行”:0,“insertId”:0,“serverStatus”:2,“警告计数”:0,“消息”:“”,“protocol41”:真,“changedRows”:0}]

和mysql查询:

 SET @var_name =  (SELECT settings_table FROM prayertime_table where id = 1);   SET @s = concat('select device_name from ', @var_name) ;  PREPARE stmt1 FROM @s;  EXECUTE stmt1;  DEALLOCATE PREPARE stmt1; 
4

0 回答 0