2014-09-10 22:08 GMT+02:00 Juri Rudi <rudij...@gmail.com>: > cliens = "select cognome, nome, paese from rubrica where (cognome > = '%s' OR nome = '%s' OR paese = '%s')" % (cognome.get(), nome.get(), > paese.get()) > cursore.execute(cliens) > Fai fare l'inserimento dei dati al db, non cercare di farne te l'escape (generando la stringa sql). Lui sa come fare. http://dev.mysql.com/doc/connector-python/en/connector-python-example-cursor-select.html
sql = "select cognome, nome, paese from rubrica where (cognome = %s OR nome = %s OR paese = %s" cursore.execute(sql, (cognome.get(), nome.get(), paese.get()) -- | Raffaele Salmaso | http://salmaso.org | https://bitbucket.org/rsalmaso | http://gnammo.com
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python