MySQL Forums
Forum List  »  Newbie

String interpolation
Posted by: Mharugha Thugha
Date: October 14, 2021 06:06PM


I'm trying to do an update, and I need to interpolate a (Subquery) inside a string.

Bellow you can see my example:

set @NT1 := 'select name from product where id=1 limit 1';

Update Conf
Set Data = '{\"ItemGroupId\":3,\"ItemDisplaySettings\":\"Text\":\"Example\",\"Text\":\"product'&@NT1&' is ok\",\"ImagePosition\":2}', stampsync='2021-10-14 22:07:17.168127'

Thank you in advance for your cooperation

Options: ReplyQuote

Written By
String interpolation
October 14, 2021 06:06PM
October 14, 2021 06:19PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.