[prev in list] [next in list] [prev in thread] [next in thread]
List: zope
Subject: Re: [Zope] Please help with DTML-in (newbie)
From: Alric Aneron <aluminum3458 () yahoo ! com>
Date: 2005-12-29 15:01:56
Message-ID: 20051229150156.77289.qmail () web50211 ! mail ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
thanks you all!! This helped a lot!
Tino Wildenhain <tino@wildenhain.de> wrote: J Cameron Cooper schrieb:
> Alric Aneron wrote:
>
>> Hello, I am new to Zope and DTML.
>> I am trying to use a python script to call a Z SQL method. The python
>> script also has a list that
>> over. so my python script:
>> -----python script
>> words = ['one', 'two']
>> context.REQUEST.set('wordlist', wordlist)
>> rs = context.myzsqlmethod()
>> return rs[0,2]
>> -----z sql script:
>> SELECT * FROM table
>> WHERE
>>
>> column1 LIKE ('
' OR
>> column2 LIKE '
')
>> sequence-end> AND
>>
And dont use
in ZSQL Methods.
In your example, use
instead.
Even if you hardcode the wordlist, but even more if its coming
from request somewhere.
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
[Attachment #5 (text/html)]
<div id="RTEContent">thanks you all!! This helped a lot!<br><br><b><i>Tino Wildenhain \
<tino@wildenhain.de></i></b> wrote:<blockquote class="replbq" \
style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: \
5px;"> J Cameron Cooper schrieb:<br>> Alric Aneron wrote:<br>> <br>>> \
Hello, I am new to Zope and DTML.<br>>> I am trying to use a python script to \
call a Z SQL method. The python<br>>> script also has a list that <dtml-in \
inside="" the="" zsql="" method="" interates=""><br>>> over. so my python \
script:<br>>> -----python script<br>>> words = ['one', 'two']<br>>> \
context.REQUEST.set('wordlist', wordlist)<br>>> rs = \
context.myzsqlmethod()<br>>> return rs[0,2]<br>>> -----z sql \
script:<br>>> SELECT * FROM table<br>>> WHERE<br>>> <dtml-in \
words=""><br>>> column1 LIKE ('<dtml-var ="" '%'+sequence-item="">' \
OR<br>>> column2 LIKE '<dtml-var ="" '%'+sequence-item="">') <dtml-unless \
=""><br>>> sequence-end> AND </dtml-unless><br>>> \
</dtml-var><br><br>And dont use <dtml-var> in ZSQL Methods.<br>In your example, use \
<dtml-sqlvar sequence-item="" type="string"> instead.<br>Even if you hardcode the \
wordlist, but even more if its coming<br>from request \
somewhere.<br></dtml-sqlvar></dtml-var></dtml-var></dtml-in></dtml-in></blockquote><br></div><p>
<hr size=1>Yahoo! Photos<br>
Ring in the New Year with <a \
href="http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pg.photos.yahoo.com/ph//page?.file=calendar_splash.html&.dir=">Photo \
Calendars</a>. Add photos, events, holidays, whatever.
_______________________________________________
Zope maillist - Zope@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 )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic