Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Python by sklins ( 16 years ago )
from django.http import HttpResponse
import MySQLdb
def db_human(request):
db= MySQLdb.connect(host='localhost', user='root', passwd='****', db='kurs')
cursor= db.cursor()
cursor.execute("SELECT * FROM kurs.human")
numrows = int(cursor.rowcount)
for x in range(0,numrows):
row = cursor.fetchone()
print row[0], "-->", row[1]
return HttpResponse(db)
Revise this Paste