Sqlite format string

Sergio Charpinel Jr. sergiocharpinel at gmail.com
Sun Aug 30 09:51:04 EDT 2009


Thank you very much.

2009/8/30 Cameron Simpson <cs at zip.com.au>

> On 29Aug2009 17:27, Sergio Charpinel Jr. <sergiocharpinel at gmail.com>
> wrote:
> | Hi,
> | I have this statement cursor.execute("SELECT * from session_attribute
> WHERE
> | sid=%s", ( user ))
> | and I'm receiving this error :
> |
> | TypeError: not all arguments converted during string formatting
> |
> | What is wrong ?
>
> This:
>
>  ( user )
>
> is not a tuple containing the element user. It's just user.
>
> This:
>
>  ( user, )
>
> is what you want.
> --
> Cameron Simpson <cs at zip.com.au> DoD#743
> http://www.cskk.ezoshosting.com/cs/
>
> [Alain] had been looking at his dashboard, and had not seen me, so I
> ran into him. - Jean Alesi on his qualifying prang at Imola '93
>



-- 
Sergio Roberto Charpinel Jr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090830/afee3e4b/attachment.html>


More information about the Python-list mailing list