MySQL: 8.0.35 - Source distribution

I have longtext (DC2Type:array) column and incorrect some characters values in a column string, so i want to replace this data format:

a:2:{s:7:"content";s:6:"text 1";s:3:"url";s:19:"https://someurl.com";}

to this data format:

a:2:{i:0;s:6:"text 1";i:1;s:19:"https://someurl.com";}

so replace: s:7:"content" to: i:0

and replace: s:3:"url" to: i:1

how to do it ?



1 Answer 1


@Ergest Basha and @Akina

resolved this ticket: sql replace function

thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.