clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 921333 fiddles created (11961 in the last week).

CREATE TABLE `m5cob_mt_links` ( `link_id` int(11) NOT NULL, `link_name` varchar(255) NOT NULL, `alias` varchar(255) NOT NULL );
 hidden batch(es)


INSERT INTO `m5cob_mt_links` (`link_id`, `link_name`, `alias`) VALUES (6, 'Convivio Bar & Restaurant Chester Cheshire UK', ''), (7, 'Slug and Lettuce Chester Cheshire UK', ''), (8, 'Da Rosa Restaurant & Wine Bar Torrevieja Costa Blanca Spain', ''), (9, 'Bar Lounge Chester Cheshire UK', ''), (10, 'Telfords Warehouse Chester Cheshire UK', ''), (11, 'The Botanist Chester Cheshire UK', ''), (12, 'Missoula Chester Cheshire UK', ''), (13, 'Fiesta Havana Chester Cheshire UK', ''), (14, 'El Oceano Hotel Restaurant, Torrenueva, Marbella, Malaga', ''), (15, 'La Plaza Restaurant Riviera del Sol Mijas Costa Malaga Spain', '');
 hidden batch(es)


UPDATE `m5cob_mt_links` SET `alias` = SUBSTRING_INDEX(REGEXP_REPLACE(REGEXP_REPLACE(LOWER(`link_name`), '[^a-z ]+', ''), ' +', '-'), '-', 5) WHERE `alias` = '';
 hidden batch(es)


SELECT * FROM `m5cob_mt_links`;
link_id link_name alias
6 Convivio Bar & Restaurant Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
7 Slug and Lettuce Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
8 Da Rosa Restaurant & Wine Bar Torrevieja Costa Blanca Spain convivio-bar-restaurant-chester-cheshire
9 Bar Lounge Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
10 Telfords Warehouse Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
11 The Botanist Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
12 Missoula Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
13 Fiesta Havana Chester Cheshire UK convivio-bar-restaurant-chester-cheshire
14 El Oceano Hotel Restaurant, Torrenueva, Marbella, Malaga convivio-bar-restaurant-chester-cheshire
15 La Plaza Restaurant Riviera del Sol Mijas Costa Malaga Spain convivio-bar-restaurant-chester-cheshire
 hidden batch(es)