Re: [pysqlite] [APSW 3.6.3-r1] Embedded SELECT?
Roger Binns <[email protected]> Tue, 18 Nov 2008 02:59:24 -0800
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fred wrote: > I'd like to make sure APSW allows two SELECT once into the other: Yes it does. I even have that in the documentation :-) Scroll down to the grey note http://apsw.googlecode.com/svn/publish/cursor.html > sql = 'SELECT id FROM table2 WHERE url GLOB "%s"' % url SQL uses single quotes for string literals. Double quotes can be used for identifiers (eg column names). And string interpolation is a real easy way to suffer SQL injection attacks. There was also a SQLite bug when people misused double quotes. The change ended up in version 3.6.5. http://www.sqlite.org/cvstrac/chngview?cn=5832 Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkioAgACgkQmOOfHg372QSExQCffjOQTELNvGciS6RRwGoOCb7Z ABUAn2h0AQtCL/7w6E/EeYx6aJjPsLyF =VRcU -----END PGP SIGNATURE-----