From 107bf3253c12b3a9f13dda26e13cf61b805faa55 Mon Sep 17 00:00:00 2001 From: Pepper Date: Thu, 30 Apr 2015 18:32:38 -0400 Subject: master --- lib/db.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 lib/db.py (limited to 'lib/db.py') diff --git a/lib/db.py b/lib/db.py deleted file mode 100755 index 2570b4f..0000000 --- a/lib/db.py +++ /dev/null @@ -1,31 +0,0 @@ -import MySQLdb -USER = "asdfus" -PASSWORD = "gTYgT&M6q" -DATABASE = "asdfus" - -class db: - def __init__ (self): - self.conn = None - self.cursor = None - self.connect() - - def connect (self): - self.conn = MySQLdb.connect (host = "localhost", - user = USER, - passwd = PASSWORD, - db = DATABASE - ) - self.cursor = self.conn.cursor () - - def execute (self,sql,args=()): - try: - self.cursor.execute(sql,args) - except MySQLdb.Error, e: - print "Error %d: %s" % (e.args[0], e.args[1]) - # sys.exit (1) - self.connect() - self.cursor.execute(sql,args) - - def lastinsertid (self): - return DB.conn.insert_id() - -- cgit v1.2.3-70-g09d2