[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Re: QSqlQuery.addBindValue malfunction
From: "Fabiano Sidler" <fabianosidler () gmail ! com>
Date: 2007-05-24 16:49:27
Message-ID: d3d66b1c0705240949s59fc635dxb492d9ec7f8de1c () mail ! gmail ! com
[Download RAW message or body]
2007/5/24, Henrik Pauli <henrik.pauli@gmail.com>:
> Maybe % is special in python
No, as I've found out now, the problem is that Qt does not parse
placeholders in strings embedded in the query string itself. So I have
to force the users to type in the % characters into the QLineEdit from
which my application gets its bindValue. Interestingly, the SQL
statement works when I omit the '"' chars around the LIKE string! :o
> (I vaguely remember it being so)
What you probably mean is the "%" used in format strings:
>>> print '%s, %s and %s' % ('Alice','Bob','Chuck')
Alice, Bob and Chuck
However, this is no special syntax. It's merely the modulo operator of
string objects that performs formatting!
Thank you for your answer anyway!
Greetings,
Fabiano
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://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