Die Suche ergab 2 Treffer

von Fl3xizzz
Dienstag 23. Februar 2016, 20:42
Forum: Raspberry Pi und Co.
Thema: MySQL fehler
Antworten: 3
Zugriffe: 1597

Re: MySQL fehler

Ja es ist ein CopyPast Fehler :D

Das mit dem einrücken habe ich mir schon fast gedacht ich komme damit nicht ganz klar :D, wenn ich das hier weg lasse funktioniert alles:

loggit = "INSERT INTO sensor1 (feuchte, temp, licht) VALUES (%s, %s, %s)"
cur.execute(loggit, (1, 1, 1))
db.commit()


Ich ...
von Fl3xizzz
Dienstag 23. Februar 2016, 18:27
Forum: Raspberry Pi und Co.
Thema: MySQL fehler
Antworten: 3
Zugriffe: 1597

MySQL fehler

Hallo Leute,

ich habe ein kleine Problem bei diesem Code:


import smbus, time, sys, MySQLdb


db = MySQLdb.connect(host="localhost", user="root", passwd="lol123", db="box")
cur = db.cursor()




class Chirp:




def __init__(self, bus=1, address=0x20):
self.bus_num = bus
self.bus = smbus ...