Re: Subtle Syntax Error

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Wed, 20 Dec 2006, [email protected] wrote:

> Your line should look like this:
>
> self.appData.cur.execute("delete from subpolicy where subpol_name = '" +
> gone + "'")
>
> Or
>
> self.appData.cur.execute("delete from subpolicy where subpol_name = ?",
> (gone,))

   Thank you, Greg.

   It also works as

   self.appData.cur.execute("delete from subpolicy where subpol_name = '%s'" % gone)

   Now I have three ways, all correct.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.