[PyQt] Help PyQt5

Sabroso Rico charolastra at outlook.com
Thu Aug 18 06:26:34 BST 2016


Greetings to all I have, this function serves to validate if the user and e exist in the database and can log your look with them, but not working please help me omo can do well?
##################################################################
    def entrar(self):
        usa = self.txa.text()
        if len(usa) == 0:
            self.txt.setText('Datos vacios')
        else:
            # self.txt.setText('Valido')
            sql = ("SELECT id FROM usuarios WHERE nombre = '%s' AND correo = '%s' LIMIT 1", str(usa))
            datos = consultas(sql)
            if  len(datos)  == 0:
                self.txt.setText('Datos incorrectos ??')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160818/217503a3/attachment.html>


More information about the PyQt mailing list