Hi list,

I have this ESQL query to my DB:

<esql:query>select id, area from ukareas order by area</esql:query>

This just returns the column rows "ID" and "AREA"

I also have this table which maps tables ukareas and county

create table navmap (
        aid integer,
        cid integer,
        primary key (aid,cid),
        foreign key (id) references ukareas(id),
        foreign key (id) references county(id)
);

I then have this query:

<esql:query>select county from county, navmap where navmap.cid = county.id and aid= 'X ' order by county</esql:query>

Where 'X' is the result of ukareas.id column, so essentially I'd like to do something like

for (int i = 0; i &lt; id.length; i++) {
//where id = ukareas.id
<esql:query>select county from county, navmap where navmap.cid = county.id and aid= '<xsp:expr>id[i]</xsp:expr>' order by county</esql:query>
}
essentially I'd be outputing something like:


South - East
        Surrey, Kent, etc...
Anglia
        Norfolk, Suffolk, etc...

I have a very, very rough idea of how I could do this but need some pointers.

Many thanks all.

Jason


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



Reply via email to