Frage

Ich kann nicht auf MYSQL Server (auf localhost) zugreifen. Python 3.1 & neueste PYQT

mein Code: generasacodicetagpre.

p.s.Ich bin anfänger.

War es hilfreich?

Lösung

It always returns True, or it always returns False? Make up your mind.

Anyway, the docs says:

Opens the database connection using the current connection values. Returns true on success; otherwise returns false. Error information can be retrieved using lastError().

So if it always returns False, that's because it couldn't open the database. Call db.lastError() to have it tell you why.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top