[Zope] A single value from SQL
Rob Page
rob.page@digicool.com
Sat, 5 Jun 1999 13:29:19 -0400
> Right. Essentially I want to treat the SQL method like a function call
> which returns a value and not a list.
Two points...
First, all SQLMethods return lists. This eliminates the need to test if
the result from a ZSQLMethod is a value or a list in DTML every single
time you use a ZSQLMethod object -- this is a Win.
Of course, your point about wanting to cleanly get at what you know to
be a single row (e.g., SELECT MAX) is a very common one. I'll poke
around and see what I see -- IMO, you and Oleg are right, there should
be (probably is) a way to grab the data directly.
--Rob