Fixed #383 -- Feed the proper SQL to cursor.execute (the one with placeholders).
Merge pull request #417 from apollo13/sql_fixes

Fixed #383 -- Feed the proper SQL to cursor.execute (the one with placeholders).