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  
--------------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to