I have a table album
that contains about 1000 rows. I want to update all rows.
Table album
have a column named path
. See full table structure below.
+---------------------------------------------------------------------------------------------+
| id | name | path |
+---------------------------------------------------------------------------------------------+
| 1 | Believe | <a href="http://example.com/bollywood/Believe-1.html">Believe</a> |
+---------+-----------+-----------------------------------------------------------------------+
| 2 | A Promise | <a href="http://example.com/bollywood/A-Promise-2.html">A Promise</a> |
+---------+----------+------------------------------------------------------------------------+
| 3 | Forever | <a href="http://example.com/bollywood/Forever-3.html">Forever</a> |
+---------------------------------------------------------------------------------------------+
I want to update path
here. Want to add album
in path for SEO friendly URLs. table should look like this for that goal.
+--------------------------------------------------------------------------------------------------+
| id | name | path |
+--------------------------------------------------------------------------------------------------+
| 1 | Believe | <a href="http://example.com/bollywood/Believe-album-1.html">Believe</a> |
+---------+-----------+----------------------------------------------------------------------------+
| 2 | A Promise | <a href="http://example.com/bollywood/A-Promise-album-2.html">A Promise</a>|
+---------+----------+-----------------------------------------------------------------------------+
| 3 | Forever | <a href="http://example.com/bollywood/Forever-album-3.html">Forever</a> |
+--------------------------------------------------------------------------------------------------+
I can't figure out how to use LIKE
here, what to insert between % %
. Please help me. Thanks in advance.