469,609 Members | 1,682 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

SQLite OperationalError near "?"

Hello

I would like to use the safe "?" placeholder in my SQLite requests but
I got the following error:

Traceback (most recent call last):
(...)
cursor.execute("SELECT ? FROM ? WHERE name = ? ", (key, self.table,
self.name))
OperationalError: near "?": syntax error

key, self.table and self.name are standart strings.

Any idea about how to solve this problem ?

Thanks in advance,

Hexade
Jun 27 '08 #1
2 7542
On Apr 13, 8:45 am, Hexade <hex...@gmail.comwrote:
Hello

I would like to use the safe "?" placeholder in my SQLite requests but
I got the following error:

Traceback (most recent call last):
(...)
cursor.execute("SELECT ? FROM ? WHERE name = ? ", (key, self.table,
self.name))
OperationalError: near "?": syntax error

key, self.table and self.name are standart strings.

Any idea about how to solve this problem ?
You may like to read the answer to the question on sqlite3 that was
posted 45 minutes before yours.
Jun 27 '08 #2
On 13 avr, 03:00, John Machin <sjmac...@lexicon.netwrote:
On Apr 13, 8:45 am, Hexade <hex...@gmail.comwrote:
Hello
I would like to use the safe "?" placeholder in my SQLite requests but
I got the following error:
Traceback (most recent call last):
* (...)
* cursor.execute("SELECT ? FROM ? WHERE name = ? ", (key, self.table,
self.name))
OperationalError: near "?": syntax error
key, self.table and self.name are standart strings.
Any idea about how to solve this problem ?

You may like to read the answer to the question on sqlite3 that was
posted 45 minutes before yours.
Thank you.

I guess you are speaking about
http://groups.google.com/group/comp....8ad977ed31e2a#
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Julien ARNOUX | last post: by
12 posts views Thread by John Salerno | last post: by
5 posts views Thread by John Salerno | last post: by
reply views Thread by Ben Wolfson | last post: by
reply views Thread by smitty1e | last post: by
reply views Thread by kurtf | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.