PDA

View Full Version : Tree menu with pl/sql and html


Simo
04-08-2005, 11:16 PM
Hi!
Does anybody have implemented an html tree with hierarchy query in pl/sql language?
I have the right query but i can't show it on html...

Thanks a lot,
Simona

Mark C. Stock
04-09-2005, 03:14 AM
"Simo" <yuppie@interfree.it> wrote in message
news:f482699.0504082316.1b7f99ce@posting.google.com... Hi! Does anybody have implemented an html tree with hierarchy query in pl/sql language? I have the right query but i can't show it on html... Thanks a lot, Simona

pl/sql web toolkit or HTMLDB?

this probably boils down to a DHTML question...

++ mcs

Simo
04-10-2005, 03:52 AM
"Mark C. Stock" <mcstockX@Xenquery .com> wrote in message news:<q62dnXux_JiyJMrfRVn-3Q@comcast.com>... "Simo" <yuppie@interfree.it> wrote in message news:f482699.0504082316.1b7f99ce@posting.google.com... Hi! Does anybody have implemented an html tree with hierarchy query in pl/sql language? I have the right query but i can't show it on html... Thanks a lot, Simona pl/sql web toolkit or HTMLDB? this probably boils down to a DHTML question... ++ mcs

Pl/sql web toolkit i mean....

bye
simona

Mark C. Stock
04-10-2005, 04:21 AM
"Simo" <yuppie@interfree.it> wrote in message
news:f482699.0504100352.6eee711b@posting.google.com... "Mark C. Stock" <mcstockX@Xenquery .com> wrote in message news:<q62dnXux_JiyJMrfRVn-3Q@comcast.com>... "Simo" <yuppie@interfree.it> wrote in message news:f482699.0504082316.1b7f99ce@posting.google.com... Hi! Does anybody have implemented an html tree with hierarchy query in pl/sql language? I have the right query but i can't show it on html... Thanks a lot, Simona pl/sql web toolkit or HTMLDB? this probably boils down to a DHTML question... ++ mcs Pl/sql web toolkit i mean.... bye simona

what type of functionality in the browser are you looking for? do you need
the hierarchy to be dynamic in any way (links, expand/collapse)? how
familiar are you with DHTML?

basically, you're going to loop though your records and issue the
appropriate DHTML tags via htp.p... here's an easy way:

create or replace procedure tree_query
as
begin
htp.p('<p>Tree Query Sample</p>');

-- start HTML table
--
htp.p('<table>');

-- loop thru hierarchical query
--
for r1 in (
select level, ename, job, empno
from emp
connect by prior empno = mgr
start with mgr is null
)
loop
-- start HTML table row
--
htp.p('<tr>');

-- generate empty cells for indent
--
for i in 2..r1.level
loop
htp.p('<td width=15>&nbsp;</td>');
end loop;

-- output row data in the final cell; use colspan so data cell is
not aligned with indent cells
--
htp.p('<td colspan=100>' || r1.ename || ' (' || r1.empno || ') ' ||
r1.job || '</td>');

-- end HTML row
--
htp.p('</tr>');
end loop;

-- end HTML table
--
htp.p('</table>');
end tree_query;


++ mcs

Simo
05-04-2005, 01:01 AM
Thanks a lot Mark!
I will try soon!

Bye
simo
Mark C. Stock ha scritto: "Simo" <yuppie@interfree.it> wrote in message news:f482699.0504100352.6eee711b@posting.google.com... "Mark C. Stock" <mcstockX@Xenquery .com> wrote in message news:<q62dnXux_JiyJMrfRVn-3Q@comcast.com>... "Simo" <yuppie@interfree.it> wrote in message news:f482699.0504082316.1b7f99ce@posting.google.com... > Hi! > Does anybody have implemented an html tree with hierarchy query
in > pl/sql > language? > I have the right query but i can't show it on html... > > Thanks a lot, > Simona pl/sql web toolkit or HTMLDB? this probably boils down to a DHTML question... ++ mcs Pl/sql web toolkit i mean.... bye simona what type of functionality in the browser are you looking for? do you
need the hierarchy to be dynamic in any way (links, expand/collapse)? how familiar are you with DHTML? basically, you're going to loop though your records and issue the appropriate DHTML tags via htp.p... here's an easy way: create or replace procedure tree_query as begin htp.p('<p>Tree Query Sample</p>'); -- start HTML table -- htp.p('<table>'); -- loop thru hierarchical query -- for r1 in ( select level, ename, job, empno from emp connect by prior empno = mgr start with mgr is null ) loop -- start HTML table row -- htp.p('<tr>'); -- generate empty cells for indent -- for i in 2..r1.level loop htp.p('<td width=15>&nbsp;</td>'); end loop; -- output row data in the final cell; use colspan so data
cell is not aligned with indent cells -- htp.p('<td colspan=100>' || r1.ename || ' (' || r1.empno ||
') ' || r1.job || '</td>'); -- end HTML row -- htp.p('</tr>'); end loop; -- end HTML table -- htp.p('</table>'); end tree_query; ++ mcs


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service