html-template-users Mailing List for HTML::Template (Page 23)
Brought to you by:
samtregar
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(42) |
Jul
(80) |
Aug
(77) |
Sep
(97) |
Oct
(65) |
Nov
(80) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(63) |
Feb
(47) |
Mar
(45) |
Apr
(63) |
May
(67) |
Jun
(51) |
Jul
(78) |
Aug
(37) |
Sep
(45) |
Oct
(59) |
Nov
(50) |
Dec
(70) |
2004 |
Jan
(23) |
Feb
(90) |
Mar
(37) |
Apr
(53) |
May
(111) |
Jun
(71) |
Jul
(35) |
Aug
(58) |
Sep
(35) |
Oct
(35) |
Nov
(35) |
Dec
(20) |
2005 |
Jan
(51) |
Feb
(19) |
Mar
(20) |
Apr
(8) |
May
(26) |
Jun
(14) |
Jul
(49) |
Aug
(24) |
Sep
(20) |
Oct
(49) |
Nov
(17) |
Dec
(53) |
2006 |
Jan
(12) |
Feb
(26) |
Mar
(45) |
Apr
(19) |
May
(19) |
Jun
(13) |
Jul
(11) |
Aug
(9) |
Sep
(10) |
Oct
(16) |
Nov
(17) |
Dec
(13) |
2007 |
Jan
(9) |
Feb
(12) |
Mar
(28) |
Apr
(33) |
May
(12) |
Jun
(12) |
Jul
(19) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
(5) |
Dec
(13) |
2008 |
Jan
(6) |
Feb
(7) |
Mar
(14) |
Apr
(16) |
May
(3) |
Jun
(1) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
(9) |
Feb
|
Mar
(10) |
Apr
(1) |
May
|
Jun
(6) |
Jul
(5) |
Aug
(3) |
Sep
(7) |
Oct
(1) |
Nov
(15) |
Dec
(1) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(3) |
Mar
|
Apr
(28) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(8) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Marina H. <ma...@MI...> - 2006-01-31 17:43:16
|
In the asktom page you reference below, the query similar to mine is used as a example that WORKS (please notice RNUM, not ROWNUM in the WHERE clause.) select * from ( select p.*, rownum rnum from ( select * from big_table ) p ) where rnum between 90 and 100 I don't think it's productive to continue the discussion whether or why it should or should not work. If anyone is still interested, they can try running this or use a table in their own schema: select * from ( select p.*, rownum rnum from ( select * from user_tab_columns ORDER BY column_name) p ) where rnum between 21 and 30 / At 05:26 PM 1/30/2006 -0800, Bob Diss wrote: >Again, please reference the Oracle documentation on >the subject. Also, you might find some helpful info >on the ROWNUM pseudo-column at >http://asktom.oracle.com, specifically >http://asktom.oracle.com/pls/ask/f?p=4950:8:5024074411414130873::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:127412348064 > >HTH! > > >--- Marina Hauptman <ma...@MI...> wrote: > > > As long as you are using RNUM column from the > > subquery, you can collapse > > the query into two levels. It works for the same > > reason RNUM works in > > RNUM > nnn. I did test it. > > > > At 11:17 AM 1/30/2006 -0800, Bob Diss wrote: > > >Sorry, but this is not the case. Because of the > > way > > >Oracle issues ROWNUM values, you can't collapse the > > >query I presented into just two levels. See the > > >Oracle Database SQL Reference. On online version > > can > > >be found at http://tahiti.oracle.com (registration > > may > > >be required?). Quote: "Conditions testing for > > ROWNUM > > >values greater than a positive integer are always > > >false." > > > > > >Essentially, Oracle assigns a ROWNUM to a row, and > > >then increments ROWNUM, as it is output by the > > WHERE > > >clause. This is why you have to do things in three > > >stages. If you filter ROWNUM as in this example > > >("between 26 and 50") you'll discover you get > > nothing. > > > This is because ROWNUM is never between 26 and 50 > > -- > > >each row output from the WHERE clause is actually > > the > > >ROWNUM=1, and since that never matches the clause, > > >ROWNUM is never incremented. > > > > > >This is why the three levels are necessary. The > > >innermost query actually generates the rows in the > > >sorted order. Since the ROWNUM value is assigned > > >before sorting, you can't do any filtering at this > > >stage on ROWNUM (the sorted records are not in > > ROWNUM > > >order). The middle strips off rows beyond your > > page, > > >and fixes the value of ROWNUM as an additional > > column > > >to the query. You can filter on ROWNUM here > > because > > >you're asking for rows <= some value. Finally, the > > >outer query strips off the rows before the ones you > > >want by filtering on the fixed-in-time value of > > >ROWNUM. > > > > > >The problem with my original query comes from a > > column > > >ambiguity on the middle query. Oracle gets > > confused > > >by the "*, rownum as rnum" portion of the query. > > This > > >can be resolved by giving the innermost select a > > table > > >alias as in: > > > > > >select * from ( > > > select x.*, rownum as rnum from ( > > > select * from a_table where a_clause order by > > >a_clause > > > ) x where rownum <= 50 > > >) where rnum >= 26 > > > > > >Thanks for pointing out the problem. > > > > > >As Marina said, where clause conditions are best > > >placed in the inner query. However, Oracle can > > >sometimes (often?) transfer the conditions from the > > >outer query down to the inner one. Oracle calls > > this > > >"predicate push". > > > > > >--- Marina Hauptman <ma...@MI...> wrote: > > > > > > > Regarding the query, > > > > The same can be accomplished with 2 levels of > > > > SELECT: > > > > > SELECT * FROM ( > > > > > SELECT A_TABLE.*, ROWNUM AS RNUM FROM > > A_TABLE > > > > ORDER BY > > > > >A_CLAUSE > > > > > ) WHERE RNUM BETWEEN 26 AND 50 > > > > > > > > Also, at least on my Oracle installation I get > > an > > > > error when * is not > > > > qualified (A_TABLE.*) in the innermost query. > > > > > > > > If there is a where clause it should apply to > > the > > > > innermost select to take > > > > advantage of existing indexes. > > > > > > > > > > > > At 12:23 PM 1/28/2006 -0800, you wrote: > > > > >One common way to return a "page" of record > > from > > > > >Oracle is to use a nested query. For example: > > > > assume > > > > >you display 25 records per page, and you wish > > to > > > > >retrieve page 2's records, your query would > > look > > > > >something like this: > > > > > > > > > >SELECT * FROM ( > > > > > SELECT * FROM ( > > > > > SELECT *, ROWNUM AS RNUM FROM A_TABLE > > ORDER BY > > > > >A_CLAUSE > > > > > ) WHERE ROWNUM <= 50 > > > > >) WHERE RNUM >= 26 > > > > > > > > > >The inner-most SELECT retrieves the records > > you're > > > > >paging and sorts them in the appropriate order. > > > > The > > > > >middle SELECT trims off the records after the > > ones > > > > you > > > > >want. The outer SELECT trims off the records > > > > before > > > > >the ones you want. > > > > > > > > > >This three-step query is necessary in Oracle > > > > because > > > > >of the way the pseudo-column ROWNUM is assigned > > > > >values. > > > > > > > > > >- Bob > > > > > > > > > >--- Philip Tellis <phi...@gm...> > > wrote: > > > > > > > > > > > Sometime on Jan 27, PIXpDIaC cobbled > > together > > > > some > > > > > > glyphs to say: > > > > > > > > > > > > > achieve pagination to display result sets > > > > queried > > > > > > from Oracle in > > > > > > > multiple pages. Is there a plug-in for > > HTML:: > > > > > > Template to achieve > > > > > > > > > > > > this isn't an HTML::Template problem, this > > is an > > > > SQL > > > > > > problem. Construct > > > > > > your SQL to only return one page of data at > > a > > > > time > > > > > > given a start and > > > > > > count. Not sure how to do it in Oracle, but > > > > MySQL > > > > > > has a non-standard > > > > > > addition called LIMIT that is added to the > > end > > > > of > > > > > > your SQL like this: > > > > > > > > > > > > LIMIT 31, 10 (get 10 records starting from > > the > > > > > > 31st) > > > > > > > > > > > > -- > > > > > > "Idiot I may be, but tied up I ain't." > > > > > > -- Gaspode the wonder dog > > > > > > (Terry Pratchett, Moving > > Pictures) > > > > > > > > > > > > > > > > > > > > > > > > > > > > >------------------------------------------------------- > > > > > > This SF.net email is sponsored by: Splunk > > Inc. > > > > Do > > > > > > you grep through log files > > > > > > for problems? Stop! Download the new AJAX > > > > search > > > > > > engine that makes > > > > > > searching your log files as easy as surfing > > the > > > > > > web. DOWNLOAD SPLUNK! > > > > > > > > > > > > > > > > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > > > > > > _______________________________________________ > > > > > > Html-template-users mailing list > > > > > > Htm...@li... > > >=== message truncated === > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com |
From: Bob D. <rl...@ya...> - 2006-01-31 01:26:53
|
Again, please reference the Oracle documentation on the subject. Also, you might find some helpful info on the ROWNUM pseudo-column at http://asktom.oracle.com, specifically http://asktom.oracle.com/pls/ask/f?p=4950:8:5024074411414130873::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:127412348064 HTH! --- Marina Hauptman <ma...@MI...> wrote: > As long as you are using RNUM column from the > subquery, you can collapse > the query into two levels. It works for the same > reason RNUM works in > RNUM > nnn. I did test it. > > At 11:17 AM 1/30/2006 -0800, Bob Diss wrote: > >Sorry, but this is not the case. Because of the > way > >Oracle issues ROWNUM values, you can't collapse the > >query I presented into just two levels. See the > >Oracle Database SQL Reference. On online version > can > >be found at http://tahiti.oracle.com (registration > may > >be required?). Quote: "Conditions testing for > ROWNUM > >values greater than a positive integer are always > >false." > > > >Essentially, Oracle assigns a ROWNUM to a row, and > >then increments ROWNUM, as it is output by the > WHERE > >clause. This is why you have to do things in three > >stages. If you filter ROWNUM as in this example > >("between 26 and 50") you'll discover you get > nothing. > > This is because ROWNUM is never between 26 and 50 > -- > >each row output from the WHERE clause is actually > the > >ROWNUM=1, and since that never matches the clause, > >ROWNUM is never incremented. > > > >This is why the three levels are necessary. The > >innermost query actually generates the rows in the > >sorted order. Since the ROWNUM value is assigned > >before sorting, you can't do any filtering at this > >stage on ROWNUM (the sorted records are not in > ROWNUM > >order). The middle strips off rows beyond your > page, > >and fixes the value of ROWNUM as an additional > column > >to the query. You can filter on ROWNUM here > because > >you're asking for rows <= some value. Finally, the > >outer query strips off the rows before the ones you > >want by filtering on the fixed-in-time value of > >ROWNUM. > > > >The problem with my original query comes from a > column > >ambiguity on the middle query. Oracle gets > confused > >by the "*, rownum as rnum" portion of the query. > This > >can be resolved by giving the innermost select a > table > >alias as in: > > > >select * from ( > > select x.*, rownum as rnum from ( > > select * from a_table where a_clause order by > >a_clause > > ) x where rownum <= 50 > >) where rnum >= 26 > > > >Thanks for pointing out the problem. > > > >As Marina said, where clause conditions are best > >placed in the inner query. However, Oracle can > >sometimes (often?) transfer the conditions from the > >outer query down to the inner one. Oracle calls > this > >"predicate push". > > > >--- Marina Hauptman <ma...@MI...> wrote: > > > > > Regarding the query, > > > The same can be accomplished with 2 levels of > > > SELECT: > > > > SELECT * FROM ( > > > > SELECT A_TABLE.*, ROWNUM AS RNUM FROM > A_TABLE > > > ORDER BY > > > >A_CLAUSE > > > > ) WHERE RNUM BETWEEN 26 AND 50 > > > > > > Also, at least on my Oracle installation I get > an > > > error when * is not > > > qualified (A_TABLE.*) in the innermost query. > > > > > > If there is a where clause it should apply to > the > > > innermost select to take > > > advantage of existing indexes. > > > > > > > > > At 12:23 PM 1/28/2006 -0800, you wrote: > > > >One common way to return a "page" of record > from > > > >Oracle is to use a nested query. For example: > > > assume > > > >you display 25 records per page, and you wish > to > > > >retrieve page 2's records, your query would > look > > > >something like this: > > > > > > > >SELECT * FROM ( > > > > SELECT * FROM ( > > > > SELECT *, ROWNUM AS RNUM FROM A_TABLE > ORDER BY > > > >A_CLAUSE > > > > ) WHERE ROWNUM <= 50 > > > >) WHERE RNUM >= 26 > > > > > > > >The inner-most SELECT retrieves the records > you're > > > >paging and sorts them in the appropriate order. > > > The > > > >middle SELECT trims off the records after the > ones > > > you > > > >want. The outer SELECT trims off the records > > > before > > > >the ones you want. > > > > > > > >This three-step query is necessary in Oracle > > > because > > > >of the way the pseudo-column ROWNUM is assigned > > > >values. > > > > > > > >- Bob > > > > > > > >--- Philip Tellis <phi...@gm...> > wrote: > > > > > > > > > Sometime on Jan 27, PIXpDIaC cobbled > together > > > some > > > > > glyphs to say: > > > > > > > > > > > achieve pagination to display result sets > > > queried > > > > > from Oracle in > > > > > > multiple pages. Is there a plug-in for > HTML:: > > > > > Template to achieve > > > > > > > > > > this isn't an HTML::Template problem, this > is an > > > SQL > > > > > problem. Construct > > > > > your SQL to only return one page of data at > a > > > time > > > > > given a start and > > > > > count. Not sure how to do it in Oracle, but > > > MySQL > > > > > has a non-standard > > > > > addition called LIMIT that is added to the > end > > > of > > > > > your SQL like this: > > > > > > > > > > LIMIT 31, 10 (get 10 records starting from > the > > > > > 31st) > > > > > > > > > > -- > > > > > "Idiot I may be, but tied up I ain't." > > > > > -- Gaspode the wonder dog > > > > > (Terry Pratchett, Moving > Pictures) > > > > > > > > > > > > > > > > > > > > > >------------------------------------------------------- > > > > > This SF.net email is sponsored by: Splunk > Inc. > > > Do > > > > > you grep through log files > > > > > for problems? Stop! Download the new AJAX > > > search > > > > > engine that makes > > > > > searching your log files as easy as surfing > the > > > > > web. DOWNLOAD SPLUNK! > > > > > > > > > > > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > > > > _______________________________________________ > > > > > Html-template-users mailing list > > > > > Htm...@li... > === message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Marina H. <ma...@MI...> - 2006-01-30 23:04:22
|
As long as you are using RNUM column from the subquery, you can collapse the query into two levels. It works for the same reason RNUM works in RNUM > nnn. I did test it. At 11:17 AM 1/30/2006 -0800, Bob Diss wrote: >Sorry, but this is not the case. Because of the way >Oracle issues ROWNUM values, you can't collapse the >query I presented into just two levels. See the >Oracle Database SQL Reference. On online version can >be found at http://tahiti.oracle.com (registration may >be required?). Quote: "Conditions testing for ROWNUM >values greater than a positive integer are always >false." > >Essentially, Oracle assigns a ROWNUM to a row, and >then increments ROWNUM, as it is output by the WHERE >clause. This is why you have to do things in three >stages. If you filter ROWNUM as in this example >("between 26 and 50") you'll discover you get nothing. > This is because ROWNUM is never between 26 and 50 -- >each row output from the WHERE clause is actually the >ROWNUM=1, and since that never matches the clause, >ROWNUM is never incremented. > >This is why the three levels are necessary. The >innermost query actually generates the rows in the >sorted order. Since the ROWNUM value is assigned >before sorting, you can't do any filtering at this >stage on ROWNUM (the sorted records are not in ROWNUM >order). The middle strips off rows beyond your page, >and fixes the value of ROWNUM as an additional column >to the query. You can filter on ROWNUM here because >you're asking for rows <= some value. Finally, the >outer query strips off the rows before the ones you >want by filtering on the fixed-in-time value of >ROWNUM. > >The problem with my original query comes from a column >ambiguity on the middle query. Oracle gets confused >by the "*, rownum as rnum" portion of the query. This >can be resolved by giving the innermost select a table >alias as in: > >select * from ( > select x.*, rownum as rnum from ( > select * from a_table where a_clause order by >a_clause > ) x where rownum <= 50 >) where rnum >= 26 > >Thanks for pointing out the problem. > >As Marina said, where clause conditions are best >placed in the inner query. However, Oracle can >sometimes (often?) transfer the conditions from the >outer query down to the inner one. Oracle calls this >"predicate push". > >--- Marina Hauptman <ma...@MI...> wrote: > > > Regarding the query, > > The same can be accomplished with 2 levels of > > SELECT: > > > SELECT * FROM ( > > > SELECT A_TABLE.*, ROWNUM AS RNUM FROM A_TABLE > > ORDER BY > > >A_CLAUSE > > > ) WHERE RNUM BETWEEN 26 AND 50 > > > > Also, at least on my Oracle installation I get an > > error when * is not > > qualified (A_TABLE.*) in the innermost query. > > > > If there is a where clause it should apply to the > > innermost select to take > > advantage of existing indexes. > > > > > > At 12:23 PM 1/28/2006 -0800, you wrote: > > >One common way to return a "page" of record from > > >Oracle is to use a nested query. For example: > > assume > > >you display 25 records per page, and you wish to > > >retrieve page 2's records, your query would look > > >something like this: > > > > > >SELECT * FROM ( > > > SELECT * FROM ( > > > SELECT *, ROWNUM AS RNUM FROM A_TABLE ORDER BY > > >A_CLAUSE > > > ) WHERE ROWNUM <= 50 > > >) WHERE RNUM >= 26 > > > > > >The inner-most SELECT retrieves the records you're > > >paging and sorts them in the appropriate order. > > The > > >middle SELECT trims off the records after the ones > > you > > >want. The outer SELECT trims off the records > > before > > >the ones you want. > > > > > >This three-step query is necessary in Oracle > > because > > >of the way the pseudo-column ROWNUM is assigned > > >values. > > > > > >- Bob > > > > > >--- Philip Tellis <phi...@gm...> wrote: > > > > > > > Sometime on Jan 27, PIXpDIaC cobbled together > > some > > > > glyphs to say: > > > > > > > > > achieve pagination to display result sets > > queried > > > > from Oracle in > > > > > multiple pages. Is there a plug-in for HTML:: > > > > Template to achieve > > > > > > > > this isn't an HTML::Template problem, this is an > > SQL > > > > problem. Construct > > > > your SQL to only return one page of data at a > > time > > > > given a start and > > > > count. Not sure how to do it in Oracle, but > > MySQL > > > > has a non-standard > > > > addition called LIMIT that is added to the end > > of > > > > your SQL like this: > > > > > > > > LIMIT 31, 10 (get 10 records starting from the > > > > 31st) > > > > > > > > -- > > > > "Idiot I may be, but tied up I ain't." > > > > -- Gaspode the wonder dog > > > > (Terry Pratchett, Moving Pictures) > > > > > > > > > > > > > > > >------------------------------------------------------- > > > > This SF.net email is sponsored by: Splunk Inc. > > Do > > > > you grep through log files > > > > for problems? Stop! Download the new AJAX > > search > > > > engine that makes > > > > searching your log files as easy as surfing the > > > > web. DOWNLOAD SPLUNK! > > > > > > > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > > _______________________________________________ > > > > Html-template-users mailing list > > > > Htm...@li... > > > > > > > >https://lists.sourceforge.net/lists/listinfo/html-template-users > > > > > > > > > > > > >__________________________________________________ > > >Do You Yahoo!? > > >Tired of spam? Yahoo! Mail has the best spam > > protection around > > >http://mail.yahoo.com > > > > > > > > > >------------------------------------------------------- > > >This SF.net email is sponsored by: Splunk Inc. Do > > you grep through log files > > >for problems? Stop! Download the new AJAX search > > engine that makes > > >searching your log files as easy as surfing the > > web. DOWNLOAD SPLUNK! > > > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > >_______________________________________________ > > >Html-template-users mailing list > > >Htm...@li... > > > >https://lists.sourceforge.net/lists/listinfo/html-template-users > > > > > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com |
From: Bob D. <rl...@ya...> - 2006-01-30 19:17:46
|
Sorry, but this is not the case. Because of the way Oracle issues ROWNUM values, you can't collapse the query I presented into just two levels. See the Oracle Database SQL Reference. On online version can be found at http://tahiti.oracle.com (registration may be required?). Quote: "Conditions testing for ROWNUM values greater than a positive integer are always false." Essentially, Oracle assigns a ROWNUM to a row, and then increments ROWNUM, as it is output by the WHERE clause. This is why you have to do things in three stages. If you filter ROWNUM as in this example ("between 26 and 50") you'll discover you get nothing. This is because ROWNUM is never between 26 and 50 -- each row output from the WHERE clause is actually the ROWNUM=1, and since that never matches the clause, ROWNUM is never incremented. This is why the three levels are necessary. The innermost query actually generates the rows in the sorted order. Since the ROWNUM value is assigned before sorting, you can't do any filtering at this stage on ROWNUM (the sorted records are not in ROWNUM order). The middle strips off rows beyond your page, and fixes the value of ROWNUM as an additional column to the query. You can filter on ROWNUM here because you're asking for rows <= some value. Finally, the outer query strips off the rows before the ones you want by filtering on the fixed-in-time value of ROWNUM. The problem with my original query comes from a column ambiguity on the middle query. Oracle gets confused by the "*, rownum as rnum" portion of the query. This can be resolved by giving the innermost select a table alias as in: select * from ( select x.*, rownum as rnum from ( select * from a_table where a_clause order by a_clause ) x where rownum <= 50 ) where rnum >= 26 Thanks for pointing out the problem. As Marina said, where clause conditions are best placed in the inner query. However, Oracle can sometimes (often?) transfer the conditions from the outer query down to the inner one. Oracle calls this "predicate push". --- Marina Hauptman <ma...@MI...> wrote: > Regarding the query, > The same can be accomplished with 2 levels of > SELECT: > > SELECT * FROM ( > > SELECT A_TABLE.*, ROWNUM AS RNUM FROM A_TABLE > ORDER BY > >A_CLAUSE > > ) WHERE RNUM BETWEEN 26 AND 50 > > Also, at least on my Oracle installation I get an > error when * is not > qualified (A_TABLE.*) in the innermost query. > > If there is a where clause it should apply to the > innermost select to take > advantage of existing indexes. > > > At 12:23 PM 1/28/2006 -0800, you wrote: > >One common way to return a "page" of record from > >Oracle is to use a nested query. For example: > assume > >you display 25 records per page, and you wish to > >retrieve page 2's records, your query would look > >something like this: > > > >SELECT * FROM ( > > SELECT * FROM ( > > SELECT *, ROWNUM AS RNUM FROM A_TABLE ORDER BY > >A_CLAUSE > > ) WHERE ROWNUM <= 50 > >) WHERE RNUM >= 26 > > > >The inner-most SELECT retrieves the records you're > >paging and sorts them in the appropriate order. > The > >middle SELECT trims off the records after the ones > you > >want. The outer SELECT trims off the records > before > >the ones you want. > > > >This three-step query is necessary in Oracle > because > >of the way the pseudo-column ROWNUM is assigned > >values. > > > >- Bob > > > >--- Philip Tellis <phi...@gm...> wrote: > > > > > Sometime on Jan 27, PIXpDIaC cobbled together > some > > > glyphs to say: > > > > > > > achieve pagination to display result sets > queried > > > from Oracle in > > > > multiple pages. Is there a plug-in for HTML:: > > > Template to achieve > > > > > > this isn't an HTML::Template problem, this is an > SQL > > > problem. Construct > > > your SQL to only return one page of data at a > time > > > given a start and > > > count. Not sure how to do it in Oracle, but > MySQL > > > has a non-standard > > > addition called LIMIT that is added to the end > of > > > your SQL like this: > > > > > > LIMIT 31, 10 (get 10 records starting from the > > > 31st) > > > > > > -- > > > "Idiot I may be, but tied up I ain't." > > > -- Gaspode the wonder dog > > > (Terry Pratchett, Moving Pictures) > > > > > > > > > > >------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. > Do > > > you grep through log files > > > for problems? Stop! Download the new AJAX > search > > > engine that makes > > > searching your log files as easy as surfing the > > > web. DOWNLOAD SPLUNK! > > > > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > _______________________________________________ > > > Html-template-users mailing list > > > Htm...@li... > > > > >https://lists.sourceforge.net/lists/listinfo/html-template-users > > > > > > > > >__________________________________________________ > >Do You Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam > protection around > >http://mail.yahoo.com > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: Splunk Inc. Do > you grep through log files > >for problems? Stop! Download the new AJAX search > engine that makes > >searching your log files as easy as surfing the > web. DOWNLOAD SPLUNK! > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > >_______________________________________________ > >Html-template-users mailing list > >Htm...@li... > >https://lists.sourceforge.net/lists/listinfo/html-template-users > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Mark S. <ma...@su...> - 2006-01-28 23:13:20
|
On 2006-01-27, Prakash Inuganti -X (pinugant - Digital-X, Inc. at Cisco) <pin...@ci...> wrote: > > I am fairly new to this alias and need some help. I am trying to achieve > pagination to display result sets queried from Oracle in multiple pages. > Is there a plug-in for HTML:: Template to achieve this? I am browsing > net for a suitable module but ended up getting more confused. Can anyone > help me with an example of how pagination can be achieved using > HTML::Template and CGI::Application modules. Apologies if this is not > the right alias for this query.Thanks in advance. You may also be interested in considering this new alternative to pagination: The "LiveGrid", which uses JavaScript and AJAX. As the user scrolls, new data is fetched from the database: http://openrico.org/rico/livegrid.page Mark |
From: Bob D. <rl...@ya...> - 2006-01-28 20:24:08
|
One common way to return a "page" of record from Oracle is to use a nested query. For example: assume you display 25 records per page, and you wish to retrieve page 2's records, your query would look something like this: SELECT * FROM ( SELECT * FROM ( SELECT *, ROWNUM AS RNUM FROM A_TABLE ORDER BY A_CLAUSE ) WHERE ROWNUM <= 50 ) WHERE RNUM >= 26 The inner-most SELECT retrieves the records you're paging and sorts them in the appropriate order. The middle SELECT trims off the records after the ones you want. The outer SELECT trims off the records before the ones you want. This three-step query is necessary in Oracle because of the way the pseudo-column ROWNUM is assigned values. - Bob --- Philip Tellis <phi...@gm...> wrote: > Sometime on Jan 27, PIXpDIaC cobbled together some > glyphs to say: > > > achieve pagination to display result sets queried > from Oracle in > > multiple pages. Is there a plug-in for HTML:: > Template to achieve > > this isn't an HTML::Template problem, this is an SQL > problem. Construct > your SQL to only return one page of data at a time > given a start and > count. Not sure how to do it in Oracle, but MySQL > has a non-standard > addition called LIMIT that is added to the end of > your SQL like this: > > LIMIT 31, 10 (get 10 records starting from the > 31st) > > -- > "Idiot I may be, but tied up I ain't." > -- Gaspode the wonder dog > (Terry Pratchett, Moving Pictures) > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do > you grep through log files > for problems? Stop! Download the new AJAX search > engine that makes > searching your log files as easy as surfing the > web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Philip T. <phi...@gm...> - 2006-01-28 11:22:56
|
Sometime on Jan 27, PIXpDIaC cobbled together some glyphs to say: > achieve pagination to display result sets queried from Oracle in > multiple pages. Is there a plug-in for HTML:: Template to achieve this isn't an HTML::Template problem, this is an SQL problem. Construct your SQL to only return one page of data at a time given a start and count. Not sure how to do it in Oracle, but MySQL has a non-standard addition called LIMIT that is added to the end of your SQL like this: LIMIT 31, 10 (get 10 records starting from the 31st) -- "Idiot I may be, but tied up I ain't." -- Gaspode the wonder dog (Terry Pratchett, Moving Pictures) |
From: Prakash I. -X \(p. - Digital-X, I. at Cisco\) <pin...@ci...> - 2006-01-27 22:06:44
|
Hi, I am fairly new to this alias and need some help. I am trying to achieve pagination to display result sets queried from Oracle in multiple pages. Is there a plug-in for HTML:: Template to achieve this? I am browsing net for a suitable module but ended up getting more confused. Can anyone help me with an example of how pagination can be achieved using HTML::Template and CGI::Application modules. Apologies if this is not the right alias for this query.Thanks in advance. Thanks Prakash |
From: Benjamin W. <war...@sb...> - 2006-01-26 04:38:06
|
I ran into this one the other day and thought I'd made a horrendous typo in my template. No such luck, though. If a default value is specified for a variable with URL or JS escaping, the default is always printed (along with any value supplied by param()), and the escaping doesn't happen. Example attached, unfortunately with nothing approaching a patch to fix it. Seems to be broken in both 2.7 and 2.8, under perls 5.6.1 and 5.8.7 (though I admit I didn't fill that matrix out completely). --Ben Warfield #!/usr/local/bin/perl -l use HTML::Template; $text = q{We're number <TMPL_VAR NAME="num" DEFAULT="one" ESCAPE="URL">!}; $t = HTML::Template->new(scalarref=>\$text); $t->param(num=>'two and 1/2'); print $t->output; __END__ We're number onetwo and 1/2! |
From: Michael P. <mp...@pl...> - 2006-01-25 01:28:12
|
I don't know if this is a bug or not, but it seems strange to me. I have die_on_bad_params set and a loop that appears twice in the template. In one version of this loop there are variables that are not in the other. But when I try to use the template, I get the standard " Attempt to set nonexistent parameter". Now, query() shows that the loop contains the variable, since at least one version does have it. I've attached an example. Is this expected behavior? -- Michael Peters Developer Plus Three, LP |
From: David W. <da...@ki...> - 2006-01-23 20:08:10
|
It is with great pleasure that the Bricolage development team announces the release of Bricolage 1.10. The culmination of over 19 months of development, version 1.10 represents a significant advance for the celebrated open-source content management and publishing system. Here are some of the highlights: PHP Templating Bricolage is the first content management system to support three different Perl-based templating architectures (Mason, Template Toolkit, and HTML::Template) as well as one in a completely different programming language: PHP 5. Bricolage 1.10 adds PHP templating support, allowing template developers to use the popular Web programming language to formatting their documents for output. This functionality is thanks to a killer new technology, known as PHP::Interpreter, that loads the PHP 5 interpreter into a Perl 5 interpreter, and affords transparent access between PHP and Perl code. The upshot is that PHP templaters get full access to the entire Bricolage API, as well as the ability to use whatever other PHP or Perl libraries they wish. Our expect is that this development will push Bricolage into new environments where PHP developers can make use of the powerful content management and publishing system without having to learn a new programming language. Furthermore, we hope that PHP::Interpreter will act as a bridge between the Perl and PHP communities, such that there is a greater exchange of ideas and a greater ability to use each other's libraries. PHP::Interpreter was developed by OmniTI. PHP::Interpreter and the PHP templating support in Bricolage were sponsored by SAPO--Portugal Online. LDAP Authentication Bricolage 1.10 includes support for a pluggable authentication architecture, and in addition to its built-in authentication has added a module for authentication against an LDAP directory server. This new feature is sure to be welcome in busy enterprises that rely on a directory server, such as Windows Active Directory http://www.microsoft.com/windowsserver2003/technologies/ directory/activ edirectory/default.mspx, Novel eDirectory http://www.novell.com/products/edirectory/, or OpenLDAP http://www.openldap.org/. Authentication can be limited to members of a directory group, and supports LDAP v.3 and TLS connectivity. Contributed by Kineticode. Revamped Interface Bricolage 1.10 sports a completely revamped browser interface that is XHTML compliant and handles all styling via CSS. Yes, our 1999-era table-driven interface is officially a thing of the past. The upshot is that the interface is much more elegant, easier to skin with your own look (by overriding its CSS files), allows search results and editing fields to expand and contract with the browser window size, and delivers pages as much as 70% smaller than they were before. The new interface was Contributed by Marshall Roch. A second major new UI feature is the revamped "Bulk Edit" interface. Gone is the old "Super Bulk Edit" interface, with the Bulk Edit revisions overtaking its functionality. Now you can edit the entire contents of a story document, from the top-most element to the bottom-most field, in a single textarea field with no reloads. The secret to allowing the full-text editing of Bricolage's unique hierarchical element structures is Plain Old Documentation, or "POD". Subelements are denoted by a new =begin POD tag, and end with a matching =end tag. The result is a much more natural editing interface. Even related stories and media are supported by new POD tags. We believe that this improvement will greatly facilitate the editing process, making Bricolage a much more enjoyable product for content editors to work with. The Bulk Edit revision is complemented by two new additions: diff support and a JavaScript-powered "Find and Replace" dialog box. Users can now see at a glance the changes between one version of a document and another. The changes are shown on a word-by-word basis, with additions in green with an underline and deletions in red with a strikeout. A similar interface is used to show the differences between versions of templates using the traditional "unified diff" format rather than word-by word. The JavaScript-powered "Find and Replace" dialog box can be used to search by strings or regular expressions in a Bulk Edit or Template editing environment. Found bits of text can also be replaced or even globally replaced. We believe that this powerful new feature, combined with the new Bulk Edit interface, makes Bricolage a compelling content editing environment. The Bulk Edit, diff, and Find and Replace features were contributed by Kineticode. What's in a Name? A somewhat less apparent but no less massive change in Bricolage 1.10 is a system-wide naming normalization. Now all objects in Bricolage are known by the same names, from the UI to the class to the database to the SOAP server. Most noticeable in the UI will be the elimination of the old "Element Type" object, and the renaming of "Element" objects to "Element Types." This change has the benefit of disambiguating element types, which define the structure of documents, and elements, which are the document parts that contain content. Gone is the confusion between element administration and content elements; there are now only element types and elements. Another example is the renaming of "Data Elements" to "Field Types" and "Fields". And in tandem with this change, the storage of field values in the database has been denormalized, so that every field value does not also store the name and key name of the field. This greatly reduces the size of the database, and should make field lookups much faster, particularly in formatting templates. And while we were going about denormalizing field storage, the data types of the database columns were also normalized. Old-style, inefficient column types have been dumped in favor of more efficient, precise column types. For example, all "NUMERIC" columns, which everywhere only contained integers or booleans, have been converted the "INTEGER" and "BOOLEAN" data types, as appropriate. This change will also be invisible to the everyday Bricolage user, but should enhance database performance by optimizing the storage of object attributes. And finally, a more visible change: Bricolage 1.10 introduces much more flexible URI formats. You can now use many more parts of the cover date in the URI, and in whatever format you like. So you could have a format of "/%{categories}/%Y-%m-%d/" and end up with the URI "/foo/bar/2004-09-22/" if you wanted. Or even "/%{categories}/%Y/ %V/" to get the week number as part of the URI. You can also include document UUIDs, and even your own text, (e.g. foobar in /%{categories}/%Y/%m/foobar/%{uuid}/". This enhancement finally allows users to almost always be able to replicate legacy URI formats in Bricolage, for a seamless upgrade from an older CMS. What are You Waiting For? There are many, many more changes in Bricolage 1.10 that, overall, make using it a joy. For a complete list of the changes, see the changes list at http://www.bricolage.cc/news/announce/changes/bricolage-1.10.0/. For the complete history of ongoing changes in Bricolage, see Bric::Changes at http://www.bricolage.cc/docs/current/api/Bric::Changes. Download Bricolage 1.10.0 now from the Bricolage Website at http://www.bricolage.cc/downloads/, from the SourceForge download page at http://sourceforge.net/project/showfiles.php?group_id=34789, or from the Kineticode download page at http://www.kineticode.com/bricolage/downloads/. About Bricolage Bricolage is a full-featured, enterprise-class content management and publishing system. It offers a browser-based interface for ease- of use, a full-fledged templating system with complete HTML::Mason, HTML::Template, PHP5, and Template Toolkit support for flexibility, and many other features. It operates in an Apache/mod_perl environment and uses the PostgreSQL RDBMS for its repository. A comprehensive, actively-developed open source CMS, Bricolage has been hailed by eWEEK as "quite possibly the most capable enterprise-class open-source application available." Enjoy! --The Bricolage Team |
From: Aaron D. <aa...@da...> - 2006-01-19 23:49:55
|
We're very pleased to announce that Krang v2.002 is now available. Notable changes in this release: * Added new script krang_upload_templates to upload a directory of templates into a Krang instance. * Added new script krang_upload_media. This works similarly to krang_upload_templates. Using this script you can maintain a media/ directory in your add-on which contains all site-specific media. This is particularly useful for development, when developing templates and site design. The script krang_createdb now automatically loads any media found in your add-on directory. * Added admin scheduler 'admin_scheduler' permissioning bit so only admin users will see this feature in the Admin section of the left nav bar. * Upgraded to HTML::Template v2.8 and HTML::Template::Expr v0.05 * Krang::XML::Validator now looks in the schema/ directories of installed Krang addons to find .xsd files describing objects to be imported or exported. This furthers the support for non-standard objects within Krang. * Fixed Krang::CGI::Help to lookup help files in an addon's htdocs/help/ directory, allowing addons to provide their own help content. * Fixed a flaw in Krang::Handler that allowed access to any file via the root handler. Now only image files and the two Krang CSS files are accessable without logging-in. * Support for running Krang under SSL. For more information about Krang, visit the Krang website: http://krang.sourceforge.net/ There you can download Krang, view screenshots, read documentation, join our mailing-lists and access the CVS tree. Detailed change-log here: http://krang.sf.net/docs/changelog.html Krang is an Open Source web-publisher / content-management system designed for large-scale magazine-style websites. It is a 100% Perl application using Apache/mod_perl and MySQL, as well as numerous CPAN modules. Krang provides a powerful and easy to use story and media editing environment for magazine editors, as well as a complete template development environment for web designers. On the back-end, Perl programmers can customize Krang to control the data entered in the story editor and add code to drive the templates to build output. Krang can be enhanced with add-ons containing new skins and other new features. Krang easily handles large data sets and can manage multiple websites in a single installation. - the Krang team ---- Aaron Dancygier |
From: Mark S. <ma...@su...> - 2005-12-24 22:06:22
|
On 2005-12-24, Octavian Rasnita <ora...@fc...> wrote: > I have tried HTML::Template::Compiled and I found a bug in it some time ago. > I have asked about it on some mailing lists, but with no helpful answer, so > I have decided to use HTML::Template. > > I was also impressed by the speed of HTML::Template::Compiled and by that > feature of accessing global vars using the dot notation. > > But the problem was that HTML::Template::Compiled use to keep the data in > memory, and show it to the next page visitor. > > I have tried to undef the vars all over the places but with no results. > After I have changed HTML::Template::Compiled with HTML::Template, all the > issues disappeared. Thanks for the feedback Octavian. If you remember enough details, please submit a bug report about it: http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Template-Compiled > Tina Mueller, the author of HTML::Template::Compiled wrote on a mod_perl > mailing list that HTML::Template::Compiled is not production ready and that > her module might have some "copy-on-write" issues and that it needs more > tests... I agree it needs some refinement. For example, I would like for methods and hashrefs both use the dot notation, like TT. I'm using HTML::Template today, and am interesting to contributing to make it production-worthy in the future. Tina has given me CVS commit access to help that make that happen. If others are interested to improve it, I think Tina will be receptive based on own experience. Mark -- http://mark.stosberg.com/ |
From: Octavian R. <ora...@fc...> - 2005-12-24 21:42:40
|
I have tried HTML::Template::Compiled and I found a bug in it some time ago. I have asked about it on some mailing lists, but with no helpful answer, so I have decided to use HTML::Template. I was also impressed by the speed of HTML::Template::Compiled and by that feature of accessing global vars using the dot notation. But the problem was that HTML::Template::Compiled use to keep the data in memory, and show it to the next page visitor. I have tried to undef the vars all over the places but with no results. After I have changed HTML::Template::Compiled with HTML::Template, all the issues disappeared. Tina Mueller, the author of HTML::Template::Compiled wrote on a mod_perl mailing list that HTML::Template::Compiled is not production ready and that her module might have some "copy-on-write" issues and that it needs more tests... Teddy ----- Original Message ----- From: "Mark Stosberg" <ma...@su...> To: <htm...@li...> Sent: Saturday, December 24, 2005 23:11 PM Subject: [htmltmpl] HTML::Template::Compiled compatibility analyzed > Some of you may be interested in my notes I wrote up about > HTML::Template::Compiled's compatibility with HTML::Template: > > http://www.perlmonks.org/?node_id=518934 > > Mark > > -- > http://mark.stosberg.com/ > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Mark S. <ma...@su...> - 2005-12-24 21:11:48
|
Some of you may be interested in my notes I wrote up about HTML::Template::Compiled's compatibility with HTML::Template: http://www.perlmonks.org/?node_id=518934 Mark -- http://mark.stosberg.com/ |
From: Sam T. <sa...@tr...> - 2005-12-22 21:41:52
|
CHANGES - Fixed param() to allow for blessed hash-refs. [Alex Kapranoff] - Fixed url-escaping to work with UTF-8 characters. [Alex Kapranoff] - Added support for JS escaping. [Alex Kapranoff] - Fixed a compatibility problem with HTML::Template v2.8, which is now a prerequisite. DESCRIPTION This module provides a just-in-time compiler for HTML::Template. Templates are compiled into native machine code using Inline::C. The compiled code is then stored to disk and reused on subsequent calls. HTML::Template::JIT is up to 8 times as fast as HTML::Template using caching. NOTE This module is not feature-complete. Be sure to read the CAVEATS section in the documentation before using! AVAILABILITY The module is available on CPAN. You can get it using CPAN.pm or go to: http://www.cpan.org/authors/id/S/SA/SAMTREGAR/ CONTACT INFO This module was written by Sam Tregar (sa...@tr...). You can join the HTML::Template mailing-list by visiting: http://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Sam T. <sa...@tr...> - 2005-12-22 17:01:38
|
On Thu, 22 Dec 2005, Alex Kapranoff wrote: > Too bad I was late to send additional ESCAPE=none (as a synonym for > ESCAPE=0) patch for completeness. It was sleeping time over here > between your two mails -- this and release announcement :) Yeah, I wondered if that would be required by default_escape. Well, patches welcome! Maybe 2.9 won't take six months to appear. -sam |
From: Alex K. <ka...@ra...> - 2005-12-22 12:21:11
|
* Sam Tregar <sa...@tr...> [December 22 2005, 01:59]: > > I added tests for loops and includes, they seem to succeed. Updated > >patch below. > > Applied for 2.8, which is coming soon by the way! That's nice, thanks! Too bad I was late to send additional ESCAPE=none (as a synonym for ESCAPE=0) patch for completeness. It was sleeping time over here between your two mails -- this and release announcement :) -- Alex Kapranoff, $n=["1another7Perl213Just3hacker49"=~/\d|\D*/g]; $$n[0]={grep/\d/,@$n};print"@$n{1..4}\n" |
From: Sam T. <sa...@tr...> - 2005-12-22 04:03:56
|
CHANGES - Added a compatibility fix required by HTML::Template v2.8. DESCRIPTION This module provides an extension to HTML::Template which allows expressions in the template syntax. This is purely an addition - all the normal HTML::Template options, syntax and behaviors will still work. Expression support includes comparisons, math operations, string operations and a mechanism to allow you add your own functions at runtime. AVAILABILITY This module is available on SourceForge. Download it at: http://html-template.sourceforge.net The module is also available on CPAN. You can get it using CPAN.pm or go to: http://www.cpan.org/authors/id/S/SA/SAMTREGAR/ CONTACT INFO You can join the HTML::Template mailing-list by visiting: http://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Sam T. <sa...@tr...> - 2005-12-22 04:03:06
|
ANNOUNCEMENT: HTML::Template 2.8 CHANGES - New Feature: the new default_escape option allows you to apply escaping to all variables in a template. [Alex Kapranoff] - Bug Fix: ESCAPE wasn't working on variables containing code-refs. - Bug Fix: Changed HTML::Template to help sub-classes by called _new_from_loop() via ref($self) rather than hard-coding the package name. [Mark Stosberg] - Bug Fix: Including more than one <tmpl_else> tag in <tmpl_unless> or <tmpl_unless> now dies with an error message, instead of silently ignoring one of the clauses. [Mitar and Mark Stosberg] - Bug Fix: Fixed HTML::Template to re-evaluate conditions to handle <tmpl_else>. This bug could cause HTML::Template to take both branches of a conditional if a code-ref parameter returned a different value when called a second time. [Emanuele Zeppieri] DESCRIPTION This module attempts to make using HTML templates simple and natural. It extends standard HTML with a few new HTML-esque tags - <TMPL_VAR>, <TMPL_LOOP>, <TMPL_INCLUDE>, <TMPL_IF>, <TMPL_ELSE> and <TMPL_UNLESS>. The file written with HTML and these new tags is called a template. It is usually saved separate from your script - possibly even created by someone else! Using this module you fill in the values for the variables, loops and branches declared in the template. This allows you to separate design - the HTML - from the data, which you generate in the Perl script. This module is licensed under the same license as Perl. See the LICENSE section below for more details. TUTORIAL If you're new to HTML::Template, I suggest you start with the introductory article available on the HTML::Template website: http://html-template.sourceforge.net AVAILABILITY This module is available on SourceForge. Download it at: http://html-template.sourceforge.net The module is also available on CPAN. You can get it using CPAN.pm or go to: http://www.cpan.org/authors/id/S/SA/SAMTREGAR/ CONTACT INFO This module was written by Sam Tregar (sa...@tr...). You can join the HTML::Template mailing-list by visiting: http://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Sam T. <sa...@tr...> - 2005-12-21 22:59:33
|
On Tue, 18 Oct 2005, Alex Kapranoff wrote: > I added tests for loops and includes, they seem to succeed. Updated > patch below. Applied for 2.8, which is coming soon by the way! Thanks, -sam |
From: Senthil N. <rs...@gm...> - 2005-12-14 20:18:26
|
Thanks a lot!!!!!!!!!!!!! This is what i wanted. So, need to use the tag, colspan with TD. Cool. Senthil On 12/15/05, Dan Horne <dan...@re...> wrote: > > If I understand you correctly, this has nothing to do with HTML::Template= ... you need to use the colspan attribute on your TD tag > > <td colspan=3D"3"> ( or 4 or how ever many columns you want to span) > > -----Original Message----- > *From:* Senthil Nathan [mailto:rs...@gm...] > *Sent:* Thursday, 15 December 2005 08:59 > *To:* dan...@re... > *Cc:* Htm...@li... > *Subject:* Re: [htmltmpl] HTML::Template - need to merge the columns of a > table > > hey, > > thats not the one i expect. > i tell the first row with the spacing as some amount of % and then check > for the bool var inside that loop. > > sample code is here, > <TABLE BORDER=3D0 cellpadding=3D"0" width=3D"100%"> > > <TR bgcolor=3D"87b77b"> > <td width=3D"15%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Job ID</b></font></td> > <td width=3D"10%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Passed</b></font></td> > <td width=3D"10%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Failed</b></font></td> > <td width=3D"10%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Total</b></font></td> > </TR> > > <TMPL_LOOP NAME=3D"job_loop"> > > <TD align=3D"center"><a href=3D"hiGuiResultsBrowser.cgi?jobid=3D<= TMPL_VAR > NAME > =3D"job_id">"> <TMPL_VAR NAME=3D"job_id"></TD> > > <TMPL_IF rep_found> > <TD>Reports are missing in the location</TD> ------> this > comes under only one column. remaining 2 columns are empty. i would like = to > merge all the columns and display. > <TMPL_ELSE> > <TD align=3D"center"><TMPL_VAR NAME=3D"passed"></TD> > <TD align=3D"center"><TMPL_VAR NAME=3D"failed"></TD> > <TD align=3D"center"><TMPL_VAR NAME=3D"total"></TD> > </TMPL_IF> > > </TR> > </TMPL_LOOP> > > </TABLE> > > > On 12/15/05, Dan Horne <dan...@re...> wrote: > > > > <tmpl_if my_flag> > > <!-- merged cells here --> > > <tmpl_else> > > <!-- non-merged cells--> > > </tmpl_if> > > > > -----Original Message----- > > *From:* htm...@li... [mailto: > > htm...@li...] *On Behalf Of *Senthil > > Nathan > > *Sent:* Thursday, 15 December 2005 08:19 > > *To:* Htm...@li... > > *Subject:* [htmltmpl] HTML::Template - need to merge the columns of a > > table > > > > Hi All, > > > > I need to merge the columns of a table during runtime in HTNL Template. > > > > I have a bool variable set, whenever the cells needs to be merged. > > So, chking for that var if its set, need to merge the cells else need t= o > > have the cells as defined earlier. > > > > How this can be done in HTML::Template?? > > > > Thanks > > Senthil > > > > > |
From: Dan H. <dan...@re...> - 2005-12-14 20:14:55
|
If I understand you correctly, this has nothing to do with = HTML::Template ... you need to use the colspan attribute on your TD tag =20 <td colspan=3D"3"> ( or 4 or how ever many columns you want to span) -----Original Message----- From: Senthil Nathan [mailto:rs...@gm...]=20 Sent: Thursday, 15 December 2005 08:59 To: dan...@re... Cc: Htm...@li... Subject: Re: [htmltmpl] HTML::Template - need to merge the columns of a table hey, thats not the one i expect. i tell the first row with the spacing as some amount of % and then check = for the bool var inside that loop. sample code is here, <TABLE BORDER=3D0 cellpadding=3D"0" width=3D"100%">=20 <TR bgcolor=3D"87b77b"> <td width=3D"15%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Job ID</b></font></td>=20 <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Passed</b></font></td> <td width=3D"10%" align=3D"center">=20 <font face=3D"Arial" size=3D"2"><b>Failed</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Total</b></font></td>=20 </TR> <TMPL_LOOP NAME=3D"job_loop"> <TD align=3D"center"><a = href=3D"hiGuiResultsBrowser.cgi?jobid=3D<TMPL_VAR NAME =3D"job_id">"> <TMPL_VAR NAME=3D"job_id"></TD>=20 <TMPL_IF rep_found> <TD>Reports are missing in the location</TD> ------> = this comes under only one column. remaining 2 columns are empty. i would like = to merge all the columns and display.=20 <TMPL_ELSE> <TD align=3D"center"><TMPL_VAR NAME=3D"passed"></TD> <TD align=3D"center"><TMPL_VAR NAME=3D"failed"></TD>=20 <TD align=3D"center"><TMPL_VAR NAME=3D"total"></TD> </TMPL_IF> </TR> </TMPL_LOOP> </TABLE> On 12/15/05, Dan Horne <dan...@re...> wrote:=20 <tmpl_if my_flag> <!-- merged cells here --> <tmpl_else> <!-- non-merged cells--> </tmpl_if> -----Original Message----- From: htm...@li... [mailto:htm...@li...] On Behalf Of Senthil Nathan Sent: Thursday, 15 December 2005 08:19 To: Htm...@li... Subject: [htmltmpl] HTML::Template - need to merge the columns of a = table Hi All, I need to merge the columns of a table during runtime in HTNL Template. I have a bool variable set, whenever the cells needs to be merged. So, chking for that var if its set, need to merge the cells else need to have the cells as defined earlier.=20 How this can be done in HTML::Template?? Thanks Senthil |
From: Senthil N. <rs...@gm...> - 2005-12-14 19:59:34
|
hey, thats not the one i expect. i tell the first row with the spacing as some amount of % and then check fo= r the bool var inside that loop. sample code is here, <TABLE BORDER=3D0 cellpadding=3D"0" width=3D"100%"> <TR bgcolor=3D"87b77b"> <td width=3D"15%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Job ID</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Passed</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Failed</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Total</b></font></td> </TR> <TMPL_LOOP NAME=3D"job_loop"> <TD align=3D"center"><a href=3D"hiGuiResultsBrowser.cgi?jobid=3D<TM= PL_VAR NAME =3D"job_id">"> <TMPL_VAR NAME=3D"job_id"></TD> <TMPL_IF rep_found> <TD>Reports are missing in the location</TD> ------> this comes under only one column. remaining 2 columns are empty. i would like to merge all the columns and display. <TMPL_ELSE> <TD align=3D"center"><TMPL_VAR NAME=3D"passed"></TD> <TD align=3D"center"><TMPL_VAR NAME=3D"failed"></TD> <TD align=3D"center"><TMPL_VAR NAME=3D"total"></TD> </TMPL_IF> </TR> </TMPL_LOOP> </TABLE> On 12/15/05, Dan Horne <dan...@re...> wrote: > > <tmpl_if my_flag> > <!-- merged cells here --> > <tmpl_else> > <!-- non-merged cells--> > </tmpl_if> > > -----Original Message----- > *From:* htm...@li... [mailto: > htm...@li...] *On Behalf Of *Senthil > Nathan > *Sent:* Thursday, 15 December 2005 08:19 > *To:* Htm...@li... > *Subject:* [htmltmpl] HTML::Template - need to merge the columns of a > table > > Hi All, > > I need to merge the columns of a table during runtime in HTNL Template. > > I have a bool variable set, whenever the cells needs to be merged. > So, chking for that var if its set, need to merge the cells else need to > have the cells as defined earlier. > > How this can be done in HTML::Template?? > > Thanks > Senthil > > |
From: Dan H. <dan...@re...> - 2005-12-14 19:52:39
|
<tmpl_if my_flag> <!-- merged cells here --> <tmpl_else> <!-- non-merged cells--> </tmpl_if> -----Original Message----- From: htm...@li... [mailto:htm...@li...] On Behalf Of Senthil Nathan Sent: Thursday, 15 December 2005 08:19 To: Htm...@li... Subject: [htmltmpl] HTML::Template - need to merge the columns of a table Hi All, I need to merge the columns of a table during runtime in HTNL Template. I have a bool variable set, whenever the cells needs to be merged. So, chking for that var if its set, need to merge the cells else need to have the cells as defined earlier. How this can be done in HTML::Template?? Thanks Senthil |