Created
January 8, 2015 09:35
-
-
Save imakin/9e0477ed6cd2b1b40a83 to your computer and use it in GitHub Desktop.
ki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def DatabaseRunQuery(self,query): | |
self.initDatabase() | |
cursor = self.db.cursor() | |
try: | |
cursor.execute(query) | |
except Exception, e: | |
print repr(e) | |
self.statusbar.showMessage(repr(e),20000) | |
result = cursor.fetchall() | |
self.db.commit() | |
self.db.close() | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment