i had once a similiar problem and is that phpmyadmin and php directly manage table and fields names with less than 24 characters long i see you got GetRankHcpAndAvgScrByDivID try taking it down to 12 characters i really dont remeber if it was 12 or 24 but i do remeber i had once time ago a similiar problem and in mysql forums they told me to make names shorter and things runned well after that.
Let us know
Sades