Check if mysql_db is iterable.
fix condition an if statement range
Merge pull request #19 from pjxiao/master

Check if variable mysql_db is iterable