Cesar A. K. Grossmann wrote:
> Hi!
>
> I'm trying to emulate an outter join in a Z SQL, but Zope crashes every
> time I try the query.
...
> What is wrong? What I can do to get the job done (I need to fill an
> multiselect with 'codigo', 'nome' from 'cad_exportacao', and if exists
> any 'codigo' for 'username' in 'user_codigo', the option must be
> selected - I tryed the "Filling MULTIPLE SELECT ... HOWTO', but it
> doesn't works for me, and I don't know why)?
I'm not sure why this should *crash* zope, but you can do it with a much
simpler query and a little DTML coding. The following should work
(UNTESTED):
Z SQL Method (named sql_query):
select codigo, nome, tipo
from cad_exportacao;
DTML Method:
<select>
<dtml-in sql_query>
<option value="&dtml-codigo;"
<dtml-if "tipo=='E'">Selected</dtml-if>>
<dtml-var nome></option>
</dtml-in>
</select>
hth,
Casey D.
_______________________________________________
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 )