So there isn't a way to directly call one ZSQLMethod from another, then.
I just tried this (and it worked!) with a simple Gadfly database: SELECT * FROM employees WHERE age = <!--#in sqlSelectOldestAge--> <!--#var oldest_age--> <!--#/in--> where sqlSelectOldestAge: ---------------------------- SELECT MAX(age) AS oldest_age FROM employees --Rob
On Sat, 5 Jun 1999, Rob Page wrote:
I just tried this (and it worked!) with a simple Gadfly database:
SELECT * FROM employees WHERE age = <!--#in sqlSelectOldestAge--> <!--#var oldest_age--> <!--#/in-->
where sqlSelectOldestAge: ---------------------------- SELECT MAX(age) AS oldest_age FROM employees
--Rob
This means than <!--#var sqlSelectOldestAge--> is a list. If you know the list has excatly 1 element (SELECT MAX must return exactly 1 row) there should be a way to extract first element off the list without #in loop. Something like <!--#var "sqlSelectOldestAge()[0]" --> Oleg. ---- Oleg Broytmann http://members.xoom.com/phd2/ phd2@earthling.net Programmers don't die, they just GOSUB without RETURN.
<!--#var sqlSelectOldestAge--> is a list. If you know the list has excatly 1 element (SELECT MAX must return exactly 1 row) there should be a way to extract first element off the list without #in loop. Something like <!--#var "sqlSelectOldestAge()[0]" -->
Right. Essentially I want to treat the SQL method like a function call which returns a value and not a list. dmd
participants (3)
-
Daniel M. Drucker -
Oleg Broytmann -
Rob Page