I would like to update specific strings in a table, but the strings themselves have variables. So,
https://www.youtube.com/watch?v=examplevideo
"examplevideo" is a variable string that I would like to preserve for the replacement string in
<iframe width="420" height="315" src="https://www.youtube.com/embed/examplevideo"></iframe>
Is there a way to do this in one update statement?
So, the table looks like this;
select messageid,userid, subject, message from feed_messages;
+-----------+--------+-------------+--------------------------------------------------------------------+
| messageid | userid | subject | message |
+-----------+--------+-------------+--------------------------------------------------------------------+
| 74 | 67 | Test | message |
| 75 | 67 | Test | message |
| 77 | 67 | Test | message |
| 78 | 67 | Test | message |
| 90 | 70 | How are ya? | message |
| 106 | 67 | Test | message |
| 107 | 67 | Test | message |
| 117 | 67 | Test post | Here's a test post;
https://www.youtube.com/watch?v=GWqD7GyJBVM |
+-----------+--------+-------------+--------------------------------------------------------------------+
I would like to keep everything in the message field for messageid 117 but modify the link so that it the video will be embeded when it posts.