On May 28, 2:47 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 28 May 2007 14:53:57 -0300, Dennis Lee Bieber > <[EMAIL PROTECTED]> escribió: > > > On Sun, 27 May 2007 20:35:28 -0400, Carsten Haese <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > >> On Sun, 2007-05-27 at 16:39 -0400, [EMAIL PROTECTED] wrote: > >> > > sql = """SELECT payment_id FROM amember_payments WHERE > >> > > member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id > >> > >>> 11 AND product_id <21)""", (self.uid) > > > It's confusing, as the example shown is not the common form for > > parameter passing on the .execute() call -- without the .execute() it is > > unclear. I presume the .execute() is using *sql to unpack the tuple... > > Yes, the original message said self.amember_cursor.execute(*sql) > It IS confusing... > > -- > Gabriel Genellina
This is how I've always writing my queries. I learned it from some tutorial I found on Google when I started - what is the preferred/ pythonic way to write this query? Thanks! Erik -- http://mail.python.org/mailman/listinfo/python-list