[Zope-DB] sqltest multiple doesn't work...

Russell Hires rhires@earthlink.net
Tue, 10 Sep 2002 10:20:11 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey everyone,

I've been playing with the sqltest tag, but I'm having trouble with multiple 
values. The examples in the zope book aren't helping me, since I don't see 
something that looks like what I need. I'm doing things for my class again, 
and though it's possble to do the assignments in straight sql, it's not so 
easy in dtml-sql. I've got a problem with compound criteria: this works in 
SQL...
select * from condo_tbl where (bedrooms = 2 and powder_room = true) or 
bedrooms = 3;
If I do this in dtml-sql:
select unit_number, bedrooms, weekly_rate
from condo_tbl 
where <dtml-sqltest bedrooms type=int multiple> 
I'm not able to put two values  in the test page field, and get a result. I 
get an error:
Error, exceptions.ValueError: Invalid integer value for bedrooms 
SQL used:
 
Could not render the query template!

The integer I enter is either "2 3" or "2,3" or even "(2,3)" no quotes, of 
course. 

Anybody got a solution?

Thanks!

Russell
- -- 
Linux -- the OS for the Renaissance Man 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ff+bAqKGrvVshJQRAka/AKDLXkJ+ULevre2MDWBe4UoZgp7B/QCgisTV
xrdq6OQOm8CWVj6vOcrOiu8=
=xuoJ
-----END PGP SIGNATURE-----