[PyQt] problem in <variable usage in sql statement>

Sibylle Koczian Sibylle.Koczian at t-online.de
Sat Feb 9 10:02:24 GMT 2008


Am Donnerstag, 7. Februar 2008 10:03:55 schrieb Phil Thompson:
>
> Dynamically create the string you want...
>
> db.query("""
>  			SELECT OS, IP_Adress
>  			FROM ServerDB
>  			WHERE IP_Adress = '%s'
>  			""" % chosen)
>

Why not use prepare and bindValue?

-- 
Dr. Sibylle Koczian


More information about the PyQt mailing list