[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Relational Database Connectivity

webmaster at zope.org webmaster at zope.org
Tue Mar 23 01:28:51 EST 2004


A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/RelationalDatabases.stx#3-69

---------------

      Suppose each department folder has a *department_id* string
      property that identifies the accounting ledger id for that
      department. This property could be used by a shared Z SQL Method to
      query information for just that department.  To illustrate,
      create various nested folders with different *department_id*
      string properties and then create a Z SQL Method with the id
      *requisition_something* in the root folder that takes three
      arguments, *description*, *quantity*, and *unit_cost*. and the
      following query template::

        INSERT INTO requisitions 
          (
            department_id, description, quantity, unit_cost
          )
        VALUES
          (
            <dtml-sqlvar department_id type=string>,
            <dtml-sqlvar description type=string>,
            <dtml-sqlvar quantity type=int>,
            <dtml-sqlvar unit_cost type=float>
          )

        % Anonymous User - Feb. 18, 2004 2:38 pm:
         I had to add the department_id to the requisition_something Z SQL Method in order to get it to test properly.
         Then the rest of the example worked out just fine.

        % Anonymous User - Mar. 23, 2004 1:28 am:
         **off-topic** the comment boxes seem to be published as preformatted text.
         The Feb. 18, 2004 2:38pm comment above seems to be the culpret.
         Why courier, larger font than the regular text? Thanks for a useful 
         if currenly ugly resource. ;) Ps please delete at will. dLd



More information about the ZDP mailing list