[Zope] Re: silly DTML question: in test

2007-12-10 Thread Bill Seitz
OK, here's a next rev that's close.

So I started out saying I have a url-arg value. Let's call that 'key'.

And note that foo_col is a boolean field.

So now zSql IfShowNextDoor contains
 SELECT foo_col FROM table where id=dtml-sqlvar key type=int

And then my DTML uses
 dtml-call REQUEST.set('z',IfShowNextDoor()[0][0])

(I avoid dtml-let because when you need to do it multiple times, the
nesting of the lets gets ugly.)

This works (setting value as 0 or 1).

(thanks to all for earlier replies: I tried posting this update
earlier but it didn't go through somehow)

On Nov 28, 2007 1:20 PM, Bill Seitz [EMAIL PROTECTED] wrote:
 I'm trying to do something in a DTML-Method (in ancient Zope 2.6.2)
 that seems like it should be really simple, but I can't get it right.

 I want to see if a value (defined via url-arg) is in a list which is
 generated from an RDBMS query (field type=integer).

 The pseudo-code would be something like:

 if foo in (select foo_col from table where x=y)
 then z='t'
 else z='f'

 I tried putting the simple SELECT query into a zSql and then calling it like:

 dtml-call REQUEST.set('foo_list',IfShowNextDoor())
 dtml-if expr=foo in foo_list
 dtml-call REQUEST.set('z','t')
 dtml-else
 dtml-call REQUEST.set('z','f')
 /dtml-if

 But that doesn't work.

___
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 )


[Zope] silly DTML question: in test

2007-11-28 Thread Bill Seitz
I'm trying to do something in a DTML-Method (in ancient Zope 2.6.2)
that seems like it should be really simple, but I can't get it right.

I want to see if a value (defined via url-arg) is in a list which is
generated from an RDBMS query (field type=integer).

The pseudo-code would be something like:

if foo in (select foo_col from table where x=y)
then z='t'
else z='f'

I tried putting the simple SELECT query into a zSql and then calling it like:

dtml-call REQUEST.set('foo_list',IfShowNextDoor())
dtml-if expr=foo in foo_list
dtml-call REQUEST.set('z','t')
dtml-else
dtml-call REQUEST.set('z','f')
/dtml-if

But that doesn't work.
___
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 )


[Zope] upgrading from 2.1.x to 2.2.5+ (on Winxx)

2001-01-12 Thread Bill Seitz

Was there ever a binary to upgrade from 2.1.x to 2.2.0
or the equivalent? Could it be rescued? Now there
appears to be no upgrader, and the manual upgrading
process described in
http://www.zope.org/Members/mcdonc/HowTos/zopeinstall/ZOPE-INSTALL-HOWTO
doesn't sound fun (esp. as it's written for Unix).

I have to do this on a few different machines (Win98
laptop, Win2K desktops/servers), so time/error savings
would be nice...


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

___
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 )