[Zope] something wrong with ZSQL
Andreas Jung
andreas at andreas-jung.com
Tue Apr 27 06:09:53 EDT 2004
Nameclash...try something like "select table1.name as table1_name,...."
-aj
--On Dienstag, 27. April 2004 11:53 Uhr +0200 Samuele Giovanni Tonon
<samu at sferacarta.com> wrote:
> hi to all,
>
> supposes you have a ZSQL method of this kind
>
> select table1.name, table1.lastname, table2.name, table2.lastname
> from table1, table2
> where table1.cod = table2.cod
>
>
> with ZPT to see them on a table i'll use something like this:
>
>
> <span tal:define="l_ppl python:container.SQLquery()">
> <span tal:condition="python:len(l_ppl) > 0">
> <table class=modifica>
> <tr tal:repeat="num python:range(0,len(l_ppl.names()))">
> <td span=1 tal:content="python:l_ppl.names()[num]">
> Name
> </td>
> <td>
> <input type=text tal:attributes="name python:l_ppl.names()[num];
> value python:l_ppl[0][num]" >
> </td>
> </tr>
> </table>
> </span>
> </span>
>
> however this gives an error :
>
> An error was encountered while publishing this resource.
>
> Error Type: ValueError
> Error Value: Duplicate column name, name
>
>
> Am i wrong or this is a big problem of ZPT ? Is there a way
> to force to user absolute name, instead of relatives ?
>
> thanks
> Samuele
>
>
>
>
>
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
More information about the Zope
mailing list