I am using the exact same query string generated and it works when i type it in the MySQL client but doesn't work when using the MySQLdb module. :(