mysql> select * from url limit 3;
+----+--------+--------------------------------------------------------+--------+--------+
| id | giinid | url | ismain | isfeed |
+----+--------+--------------------------------------------------------+--------+--------+
| 1 | 287 | http://www.aisawa.net/ | 1 | 0 |
| 2 | 287 | http://twitter.com/statuses/user_timeline/95405735.rss | 0 | 1 |
| 3 | 244 | http://www.a-jiro.jp/ | 1 | 0 |
+----+--------+--------------------------------------------------------+--------+--------+
mysql> select * from url where `url` like 'http://twitter.com/statuses/user_timeline/%' limit 3;
+----+--------+---------------------------------------------------------+--------+--------+
| id | giinid | url | ismain | isfeed |
+----+--------+---------------------------------------------------------+--------+--------+
| 2 | 287 | http://twitter.com/statuses/user_timeline/95405735.rss | 0 | 1 |
| 16 | 618 | http://twitter.com/statuses/user_timeline/123482369.rss | 0 | 1 |
| 23 | 634 | http://twitter.com/statuses/user_timeline/112283606.rss | 0 | 1 |
+----+--------+---------------------------------------------------------+--------+--------+
3 rows in set (0.00 sec)
mysql> UPDATE url SET url = REPLACE(url, '.rss', '');
Query OK, 141 rows affected (0.16 sec)
Rows matched: 1458 Changed: 141 Warnings: 0
mysql> select * from url where `url` like 'http://twitter.com/statuses/user_timeline/%' limit 3;
+----+--------+-----------------------------------------------------+--------+--------+
| id | giinid | url | ismain | isfeed |
+----+--------+-----------------------------------------------------+--------+--------+
| 2 | 287 | http://twitter.com/statuses/user_timeline/95405735 | 0 | 1 |
| 16 | 618 | http://twitter.com/statuses/user_timeline/123482369 | 0 | 1 |
| 23 | 634 | http://twitter.com/statuses/user_timeline/112283606 | 0 | 1 |
+----+--------+-----------------------------------------------------+--------+--------+
3 rows in set (0.00 sec)
mysql> UPDATE url SET url = REPLACE(url, 'http://twitter.com/statuses/user_timeline/', 'http://api.twitter.com/1/statuses/user_timeline.rss?user_id=');
Query OK, 139 rows affected (0.02 sec)
Rows matched: 1458 Changed: 139 Warnings: 0
mysql> select * from url where `url` like 'http://twitter.com/statuses/user_timeline/%' limit 3;
Empty set (0.00 sec)
mysql> select * from url where `url` like 'http://api.twitter.com/1/statuses/user_timeline.rss?user_id=%' limit 3;
+----+--------+-----------------------------------------------------------------------+--------+--------+
| id | giinid | url | ismain | isfeed |
+----+--------+-----------------------------------------------------------------------+--------+--------+
| 2 | 287 | http://api.twitter.com/1/statuses/user_timeline.rss?user_id=95405735 | 0 | 1 |
| 16 | 618 | http://api.twitter.com/1/statuses/user_timeline.rss?user_id=123482369 | 0 | 1 |
| 23 | 634 | http://api.twitter.com/1/statuses/user_timeline.rss?user_id=112283606 | 0 | 1 |
+----+--------+-----------------------------------------------------------------------+--------+--------+
3 rows in set (0.00 sec)
mysql>