[Zope] Re: [Zope-dev] SQL-Methods Through-the-FileSystem
Hi Johan, Does anybody have a good suggestion how to develope SQL Method ftfs (through the filesystem) rather than ttw. Perferably in someway similare to the HTMLFile way try something like this: from Products.ZSQLMethods.SQL import SQL import PoPy def manage_add_user(self,email,password): conn = 'PoPy_database_connection' self.sql_add_user=SQL('sql_add_user', '', conn, 'email password', _sql_add_user) _sql_add_user = """ insert into tbl_users(email,password) values ( dtml-sqlvar email type=string, dtml-sqlvar password type=string ) """ hth, seb ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Zope-dev] SQL-Methods
Andre Schubert writes: i ave a problem, i do some sql-queries in my python product and would return the results like the ZSQLMethods. How do i have to return the data and field names from my python product to an dtml document so that i can work with it like ZMYSQL. "dtml-in" expects its argument to behave like a sequence of objects. It makes the current object's attributes available for direct access. Z SQL Methods use the class "Shared.DC.ZRDB.Results.Results" for results which in turn uses a subclass of "Shared.DC.ZRDB.Record" to wrap the rows. Look at the code in "Shared/DC/ZRDB" on how to use them. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )