But how do I get the connection id ?
Actually I get it when I instance the product in Zope.
What I think is something like
class Foo
  def __init__ (self, conn):
    self.conn = conn
  myquery = SQL ('doMyQuery', '', self.conn, '', 'select * from table')
but obviously it will not work.
p.s. Sorry for top-posting

Marco Bizzarri <[EMAIL PROTECTED]> ha scritto:
I can't talk for best practise. You can put your queries also outside of
the init, in this way:

class YourProduct:

_my_query = SQL('doMyQuery', '',
'your_connection', '', 'select * from data')

def __init__(self):

Also, if you have a *LOT* of queries, consider in building your query on
the fly.

Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to