In my scenario, I check the existence of a record on a MySQL database. Then with an If node, if this row exists I do one thing, and if it doesn’t, I do another thing.
But I can’t get the correct value from the MySQL query result. This is the query to MySQL:
SELECT EXISTS(SELECT *
WHERE text = ‘Muy bien felicidades’ AND username = ‘xxxxxx’ AND mediaid = ‘123456789’);
and it returns me the value “1”, because this row already exists.
But when I add the expression of this result on the If node, it doesn’t recognize the node reference in the expression, because it doesn’t have a static text, it changes every time. Look at the image:
The text of the query is used as a reference for the MySQL node in the expression. So if the query changes, the reference is lost, and it doesn’t found its value.
How can I solve this?