[Zope] Two in one?

2000-06-02 Thread Andy Gates

Fun for all the family.  I'm trying to produce a page that draws from 
two databases following one friendly search.  The first chunk of data 
is from the search itself and returns, among others, an ID which I want
to pass into the second chunk to search it.  Kinda like this:

Search page: blah

Report page: loop thru hits on "blah" in db1, any of 6 fields (name, 
desc)
show id
show name
show desc...
loop thru hits in id db2
show users
show friendlynames
/loop
/loop

The problem I have is passing parameters to the db2 search.  Even if I 
set the SQL method to use a parameter with the same name as the var 
returned by the first search, I get a Zope error telling me I'm not 
passing enouh parameters to it.  Testing the methods independently they
work fine.

So, (as usual) what's the no-brain bozo error I'm making?  Is is 
possible to programmatically pass variables around like this (surely it
is,this would be trivial in ASP/JSP)?
--
Andy Gates, Learning and Research Technology
[EMAIL PROTECTED] - ICQ#74362415


___
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 )




Re: [Zope] Two in one?

2000-06-02 Thread Andrew Kenneth Milton

+[ Andy Gates ]-
| Fun for all the family.  I'm trying to produce a page that draws from 
| two databases following one friendly search.  The first chunk of data 
| is from the search itself and returns, among others, an ID which I want
| to pass into the second chunk to search it.  Kinda like this:
| 
| Search page: blah
| 
| Report page: loop thru hits on "blah" in db1, any of 6 fields (name, 
| desc)
|   show id
|   show name
|   show desc...
|   loop thru hits in id db2
|   show users
|   show friendlynames
|   /loop
| /loop

dtml-in "secondQuery(id=id, name=name)"

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

___
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 )




Re: [Zope] Two in one?

2000-06-02 Thread Andy Gates

 dtml-in "secondQuery(id=id, name=name)"

Ahh... quotes.  Parentheses.  Works a treat.  Ta.

AndyG

___
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 )