mysql> SELECT n.name_id,n.full_name,a.account_id,b.boxfolder_id,b.volume,b.folder,b.range,substring(a.url,118,locate('&',a.url,118)-118) AS value2 FROM names as n LEFT JOIN account AS a ON n.name_id = a.name_id LEFT JOIN boxfolder AS b on a.boxfolder_id = b.boxfolder_id WHERE n.full_name REGEXP '[[:<:]]byrne[[:>:]]' LIMIT 10; +---------+----------------------------+------------+--------------+--------+--------+-----------+---------+ | name_id | full_name | account_id | boxfolder_id | volume | folder | range | value2 | +---------+----------------------------+------------+--------------+--------+--------+-----------+---------+ | 7220 | Byrne, E. & McCausland A. | 2642 | 322 | 31 | 8 | 5123-5148 | =b22f08 | | 7221 | Byrne, G. | 2643 | 295 | 29 | 11 | 4293-4314 | =b20f11 | | 7222 | Byrne, John | 2644 | 106 | 16 | 1 | 6003-6128 | =b08f01 | | 7223 | Byrne, P. | 2645 | 425 | 37 | fol03 | | =fol03 | | 7224 | Byrne, P., Estate of | 2646 | 425 | 37 | fol03 | | =fol03 | | 7225 | Byrne, Patrick | 2672 | 210 | 23 | 1 | 1404-1433 | =b15f01 | | 7225 | Byrne, Patrick | 2673 | 210 | 23 | 1 | 1404-1433 | =b15f01 | | 7225 | Byrne, Patrick | 2674 | 214 | 23 | 5 | 1502-1538 | =b15f05 | | 7225 | Byrne, Patrick | 2675 | 215 | 23 | 6 | 1539-1596 | =b15f06 | | 7225 | Byrne, Patrick | 2676 | 215 | 23 | 6 | 1539-1596 | =b15f06 | +---------+----------------------------+------------+--------------+--------+--------+-----------+---------+