When I tried to execute this command in phpMyAdmin, it gave this error message:
SELECT SUBSTRING ('San Antonio, TX', 5, 3);
#1630 - FUNCTION head_first.SUBSTRING does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
The solution is simple and universal: remove the space between the functioin SUBSTRING and (), like this:
SELECT SUBSTRING('San Antonio, TX', 5, 3);