[Zope] SQL: nested select
Dieter Maurer
dieter@handshake.de
Mon, 19 Aug 2002 22:38:38 +0200
Bryan C. Andregg writes:
> I'm trying to generate a SQL query that includes a nested select tag,
> something like
>
> select * from models where name =
> ( select name from users where uid = <dtml-sqlvar uid type=int )
>
> I can do this easily by itself, but I'd like to be able to use this with some
> other optional parameters controled by a sqlgroup tag,
>
> select * from models
> <dtml-sqlgroup where>
> <dtml-sqltest foo type=nb optional>
> <dtml-and>
> <dtml-sqltest bar type=nb optional>
> <dtml-and>
> ... My Test Here ...
name = (select ...)
> </dtml-sqlgroup>
Dieter