[Zope] Nested select or call a ZSQL method from another ZSQL?
Jorge O. Martinez
jmartinez@eMediaMillWorks.com
Sun, 09 Jun 2002 17:53:04 -0400
Hi:
I am not sure what is the better way to go, but I need to do a select statement
using some input from another zsql method. I tried using <dtml-var
sql_delimiter> but didn't get it work, the query is simple:
select * from foo
<dtml-sqlgroup where>
id =
<dtml-var sql_delimiter>
select my_id from bar where user = VAR and class = CLA
</dtml-var sql_delimiter>
</dtml-sqlgroup>
(I know this looks horrible, but not sure what the right syntax would be for
that nested where and select statements.
--------------
The only value I pass to this method are VAR and CLA, I would then expect the
method to run the nested select query first, and then, once I got the value for
'my_id', I would like the outer select to be executed with the value I got from
the nested one. I am not having luck, is the above the right approach? Or would
it be better to just to a separate zsql method with the query inside
sql_delimiter? If so, what would be the syntax?
Thanks for any ideas before hand,
Regards,
Jorge M.
--
Jorge O. Martinez
MIS Senior Associate
eMediaMillWorks
1100 Mercantile Lane, Suite 119
Largo, MD 20774
E-mail => jmartinez@eMediaMillWorks.com
Phone => (301)883-2482 ext. 105
Fax => (301)883-9754