get the last index of mysql php code example Example: find last instance of character in string mysql SELECT SUBSTRING_INDEX("first_middle_last", '_', -1);