This is an invalid assignment. You may not have spaces in front of or behind the equal sign in the shell - in contrast to most programming languages I know:
if [ $i -le 100 ]
        then r_kills = '100';
if [ $i -le 100 ]
        then r_kills=100;
Note that there isn't a way to distinguish numbers and text in the shell, either. Single- and double quotes are only used to mask special characters, including whitespace.
The message 
sh: 21: cron.rankme.sh: r_kills: not found
mislead me to think, you used something which is not in the path, but in reality, the tokenizer had decided, that r_kills = '100' is a programm call to r_kills with two parameters, '=' and '100'. 
The first line - without knowing mysql very well, 
MYSQL_RESULT=mysql -u LOGIN -pPASS -D "TABLE_NAME" -e "SQL request";
most probably has to be 
MYSQL_RESULT=$(mysql -u LOGIN -pPASS -D "TABLE_NAME" -e "SQL request";)
or 
MYSQL_RESULT=($(mysql -u LOGIN -pPASS -D "TABLE_NAME" -e "SQL request";))
to create an array, since you try to iterate over the variable.