I'm trying to update my mySql
database. the value of Value
is
{
"Subject": "Subject here",
"Content": "The content here",
"TextContent": "Here text content goes",
"To": "this is to user<[email protected]>",
"From": "Name of User<[email protected]>"
}
Now what to do I've to search for From
tag and then Replace
the Name of User<[email protected]>
to other user<[email protected]>
.
The value after From
tag is unknown for me. so i want to replace the whole things in between ""
quotes.
for that what I'm doing currently
UPDATE `Table_Name`
SET Value= REPLACE(Value,'Name of User<[email protected]>','other user<[email protected]>')
WHERE Name = 'Name_of_field' && INSTR(Value,'From')>0;
I know this is wrong way to do this. please suggest me a way because here I'm using Name of User<[email protected]>
that is unknown for me.