Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95527
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Cecil Westerhof <Cecil@decebal.nl> |
| Newsgroups | comp.lang.python |
| Subject | Every character of a string becomes a binding |
| Date | Fri, 21 Aug 2015 18:39:28 +0200 |
| Organization | Decebal Computing |
| Lines | 17 |
| Message-ID | <871tewppdr.fsf@Equus.decebal.nl> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="4363"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WXgHgFZ9qfvOyGP5AYczKI5NOdeYmhxY=" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| X-Homepage | http://www.decebal.nl/ |
| Cancel-Lock | sha1:1UXV4Su3GTIXEgn0qgKFrZ24UPg= sha1:/f8hiFPCp6h5Top4HJBkdgQmeyM= |
| Xref | csiph.com comp.lang.python:95527 |
Show key headers only | View raw
I have the following with sqlite3:
urls = c.execute('SELECT URL FROM LINKS WHERE URL = ?', url).fetchall()
But this gives:
Traceback (most recent call last):
File "./createDB.py", line 52, in <module>
urls = c.execute('SELECT URL FROM LINKS WHERE URL = ?', url).fetchall()
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 40 supplied.
The number of bindings is the length of the string.
What is happening here? Why is every character of the string seen as a
binding, instead of the string being the binding?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Every character of a string becomes a binding Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 18:39 +0200
Re: Every character of a string becomes a binding Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-08-21 11:50 -0500
Re: Every character of a string becomes a binding Cecil Westerhof <Cecil@decebal.nl> - 2015-08-21 19:04 +0200
Re: Every character of a string becomes a binding Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-08-22 11:45 +0200
Re: Every character of a string becomes a binding John Gordon <gordon@panix.com> - 2015-08-21 17:02 +0000
Re: Every character of a string becomes a binding Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-08-21 20:47 -0400
Re: Every character of a string becomes a binding Chris Angelico <rosuav@gmail.com> - 2015-08-22 11:03 +1000
csiph-web