Database Query as a string

Hello,

Today i have this issue, i want to create a variable with this query:

UPDATE node__field_news_links a
INNER JOIN node__field_news_links b ON a.entity_id = b.entity_id and a.langcode = b.langcode
SET a.field_news_links_value = replace(b.field_news_links_value, ‘’, ‘’)
WHERE a.field_news_links_value LIKE ‘%
%’ ;

But i can’t, i tried to put double quotes but it dosn’t work, i need to divide the update in 3 strings but it dosn’t work.

How can i make that??

Regards

1 Like