Description: If count is positive, returns the portion of string to the left of occurrence number count of delimiter.
If count is negative, returns the portion of string to the right of occurrence number count of delimiter starting from the right.
Examples:
SUBSTRING_INDEX('www.mysite.com','.',1) returns www.
SUBSTRING_INDEX('www.mysite.com','.',-1) returns com.
See also: SUBSTRING()
18.117.7.131