Can someone please tell me why this class wont work.
#!/usr/bin/python
import MySQLdb
class test:
@staticmethod
def wanker():
# connect
db = MySQLdb.connect(host = "localhost", user = "username", passwd = "Password", db = "test")
# create a database cursor
cursor = db.cursor(MySQLdb.cursors.DictCursor)
# execute SQL select statement
cursor.execute("SELECT * FROM Threshold")
Results = cursor.fetchall()
return Results
x = test()
adam = x.wanker()
print adam
nothing is returned :(