update test2 set aaa = SUBSTRING(title, LOCATE('id=', title) + 3, (LOCATE('&prjid=', title) - LOCATE('id=', title) - 3));