Well, works fine. Mni thx ;-)

Chris

David Schwartz wrote:

In your SQL statement use an alias...

SELECT name_${language} As namedLanguage,
iso3166
FROM countries
ORDER BY name_${language}

In the <option> list...

<option value="<c:out value='${row.iso3166}' />">
   ${row.namedLanguage}
</option>

now your result column will always have the same, expected name.

Quoting Christoph Pilka <[EMAIL PROTECTED]>:



Hi folks,

anyone knows how to express the following snippet?

<sql:query var="myQuery">
 SELECT name_${language}, iso3166 FROM countries ORDER BY name_${language}
</sql:query>
<c:forEach var="row" items="${myQuery.rows}">
 <option value="<c:out value='${row.iso3166}' />">
   ${row.name_${language}}
 </option>
</c:forEach>

The expression ${row.name_${language}} is the one making trouble. How to
substitute a variable in a variable?

Mni thx,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






David Schwartz
Array Software Inc.
http://www.arrayone.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to