summaryrefslogtreecommitdiff
path: root/im/cgi-bin/db.py
diff options
context:
space:
mode:
authoryo mama <pepper@scannerjammer.com>2015-02-15 18:21:14 -0800
committeryo mama <pepper@scannerjammer.com>2015-02-15 18:21:14 -0800
commitca7216ef0777de4ea226c6d672c4862362f9e74c (patch)
tree35444af3fe7159efb6c6358a21b1c1867e4fd6fd /im/cgi-bin/db.py
parent08640b7ab204e99463f37e5efb4af28f091c0b61 (diff)
finalizing
Diffstat (limited to 'im/cgi-bin/db.py')
-rwxr-xr-xim/cgi-bin/db.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/im/cgi-bin/db.py b/im/cgi-bin/db.py
deleted file mode 100755
index 4da7b83..0000000
--- a/im/cgi-bin/db.py
+++ /dev/null
@@ -1,29 +0,0 @@
-import MySQLdb
-import time
-
-def now ():
- return int(time.mktime(time.localtime()))
-class db:
- def __init__ (self):
- self.conn = None
- self.cursor = None
- self.connect()
-
- def connect (self):
- self.conn = MySQLdb.connect (host = "127.0.0.1",
- user = "asdfus",
- passwd = "gTYgT&M6q",
- db = "asdfus")
- 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()