[ic] Look ahead at next value in a query/list?
Frank Drummond
fdrummond at d2computers.com
Mon Jul 7 12:37:53 EDT 2003
Sorry, that will still give you an extra at the end.
Frank
-----Original Message-----
From: Interchange User [mailto:interchange at framework.cx]
Sent: Monday, July 07, 2003 11:28 AM
To: interchange-users at icdevgroup.org
Subject: [ic] Look ahead at next value in a query/list?
Hi all,
Is there a way to look ahead at values returned by a [query] to tell if
there is another record about to be returned in between the
[list][/list] tags? For instance, I have the following code, which
returns a list of authors from a table. I want to put the comma after
"[sql-param author]" only if there's another author in the list, but
not at the end.
------------------------------------------------------------
[query
sql="select author FROM authors where article =
'[item-code]' ORDER
BY authorship"
type=list
list=1
st=db
]
[list]
[sql-param author],
[/list]
[/query]
------------------------------------------------------------
Currently, I end up with something like
"Johnson J, Nichols RJ, Koch C, Gray J, Will L, Ernst B,"
and I'd like to not put the comma in if I'm at the end of my results
lists.
Thanks,
Peter
_______________________________________________
interchange-users mailing list
interchange-users at icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
More information about the interchange-users
mailing list