I am having to update records in a table where the field will contain a substitution of another value.. something like this:
mysql> desc dummy;
+-------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| label | varchar(255) | YES | | NULL | |
+-------+--------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
mysql> insert into dummy (label) values ('/images/oldphil/phil.jpg');
Query OK, 1 row affected (0.00 sec)
mysql> select * from dummy;
+----+-------------------------------------------------------------+
| id | label |
+----+-------------------------------------------------------------+
| 1 | /images/oldphil/phil.jpg |
+----+-------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> update dummy set label = '%/newphil/%' where label = '%/oldphil/%';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql>
I've been testing this and producing 0 results(I'm using 4.0.10 and 3.23.41). Any other ideas?
Thanx
Phil