[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Help PyQt5
From:       Sabroso Rico <charolastra () outlook ! com>
Date:       2016-08-18 5:26:34
Message-ID: CY1PR07MB24756A99A4D2F8AB4DA3A04FB2150 () CY1PR07MB2475 ! namprd07 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

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 ??')


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="&#43;2"><i>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?<br> \
##################################################################<br> \
&nbsp;&nbsp;&nbsp; def entrar(self):<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; usa = \
self.txa.text()<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if len(usa) == 0:<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.txt.setText('Datos \
vacios')<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else:<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # \
self.txt.setText('Valido')<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; sql = (&quot;SELECT id FROM usuarios WHERE nombre = '%s' AND \
correo = '%s' LIMIT 1&quot;, str(usa))<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; datos = consultas(sql)<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; if&nbsp; len(datos)&nbsp; == 0:<br> &nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.txt.setText('Datos \
incorrectos ??')<br> </i></font>
</body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic