Simple Database Query
by xray55 from LinuxQuestions.org on (#4T8GK)
MySql57
table name: streams
field name: stream_source
Hey guys,
Im trying to edit about 235 weblinks inside a small database.
I want to remove the highlighted characters
http://domain:9595/live/USERNAME/PASSWORD/425.m3u8
and end up with streams that look like
http://domain:9595/USERNAME/PASSWORD/425
removing find/replace .m3u is easy enough but I need to also remove the word live and one of the slashes besides it so I dont end up with double slashes //
This is what I attempted
Code:update streams set stream_source = replace(stream_source, '/live/', '/');
update streams set stream_source = replace(stream_source, '.m3u8', '');
exit;
the .m3u8 is replaced with blank so that works but slash / is not replacing /live/
my understanding is that u cant search and replace slashes /
what can I do to get around this?


table name: streams
field name: stream_source
Hey guys,
Im trying to edit about 235 weblinks inside a small database.
I want to remove the highlighted characters
http://domain:9595/live/USERNAME/PASSWORD/425.m3u8
and end up with streams that look like
http://domain:9595/USERNAME/PASSWORD/425
removing find/replace .m3u is easy enough but I need to also remove the word live and one of the slashes besides it so I dont end up with double slashes //
This is what I attempted
Code:update streams set stream_source = replace(stream_source, '/live/', '/');
update streams set stream_source = replace(stream_source, '.m3u8', '');
exit;
the .m3u8 is replaced with blank so that works but slash / is not replacing /live/
my understanding is that u cant search and replace slashes /
what can I do to get around this?