[PyQt] problem in <variable usage in sql statement>
Enis Karaarslan
enis.karaarslan at ege.edu.tr
Thu Feb 7 08:37:44 GMT 2008
Hello all,
I am a newbie in PyQt, just a simple question.
I want to use a variable in my sql tatement.
If I use string, following statment runs smoothly
db.query("""SELECT OS, IP_Adress
FROM ServerDB
WHERE IP_Adresi='10.22.5.1'""")
s = db.store_result()
But I want to use the variable "chosen" and get the IP_Adresses equal to that
variable such as:
db.query("""
SELECT OS, IP_Adress
FROM ServerDB
WHERE IP_Adress = chosen
""")
But it doesn't work ...
thanks for the help
--
--------------------------------------------
* Ar.Gör.Enis Karaarslan
* Ege Üniversitesi
* Kampüs Network Yönetim Grubu
* ULAK-CSIRT - http://csirt.ulakbim.gov.tr
--------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080207/c9fe8cf6/attachment.bin
More information about the PyQt
mailing list