News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

MYSQL Replace part of string

Started by mickjav, August 11, 2024, 07:31:35 AM

Previous topic - Next topic

mickjav

I and trying to replace the section indecated below

Code ("section of text to be removed") Select
#Crawlers_Album_The_Mess_We_Seem_To_Make #Crawlers<br><br>[center][url=&quot;https://www.databasedreams.co.uk/charts/index.php?action=gallery;sa=view;id=35847&quot;]
#Crawlers_Album_The_Mess_We_Seem_To_Make #Crawlers<br><br>[center][url=&quot;https://www.databasedreams.co.uk/charts/index.php?action=gallery;sa=view;id=35847&quot;][img]https://www.databasedreams.co.uk/charts/gallery/35/medium_1-270224213050-35846450.jpeg[/img][/url]<br>[music_rawards id=-2028986475]Awards[/music_rawards][/center]<br><br>&nbsp; &nbsp;  Released: [color=pink][size=2]16 February 2024[/size][/color]<br>&nbsp; &nbsp;  Cat no: [color=pink][size=2]5827488[/size][/color]<br>&nbsp; &nbsp;  Album Type: [color=pink][size=2]Studio Album[/size][/color]<br><br>[music_rinfo id=-2028986475]Info[/music_rinfo]<br>[music_rstats id=-2028986475]Stats[/music_rstats]
I have tried

UPDATE `database_messages` SET `body`= RIGHT(`body`, INSTR(`body`,'][img]')+1) WHERE `id_board` = 128 and INSTR(`body`,'][img]');
I keep messing it up and having to update the test messages from the main sites messages

thanks mick


Site Under redesign not expected to be complete before July 2025

Advertisement: