>>> Todd Chapman <[EMAIL PROTECTED]> 12/03 4:14 >>>
>Not sure what you are asking but maybe you want.
Thank you for your fast anwsers and
sorry for my confused questions resp. my bad english.
I`ll try it with an example:
>From the Database in the perlscript:
...
$SQL="SELECT name, street, id FROM users";
$list = $st1->fetchall_arrayref({});
$template->param(myloop=>$list);
...
in the HTML-TMPL-File:
...
<TABLE>
<TR>
<TH>No.</TH> <!-- a serial number 1,2,3,4 -->
<TH>Name</TH>
<TH>Street</TH>
<TH>delete</TH>
<TH>edit</TH>
</TR>
<!-- TMPL_LOOP NAME=userlist -->
<TR>
<TD><!-- TMPL_VAR NAME=no --></TD>
<TD><!-- TMPL_VAR NAME=name --></TD>
<TD><!-- TMPL_VAR NAME=street --></TD>
<TD><a href="javascript:deleteUser(<!-- TMPL_VAR NAME=id -->,'<!--
TMPL_VAR NAME=name -->')">delete</a></TD>
<TD><a href="javascript:editUser(<!-- TMPL_VAR NAME=usernr
-->)">edit</a></TD>
</TR>
<!-- /TMPL_LOOP -->
...
It is very simple to fill up the template with $list =
$st1->fetchall_arrayref({});
but it is bad to add another TAG like <!-- TMPL_VAR NAME=no -->
So now I`m searching for a modul with functions like
HTML::Template::Data->addToHash($myhashref,$keyname,$value,$position). Yes,
I'm very lazy :-)
I found a solution: I have enhanced the SQL statement, but this is not
provided by any database.
by
Sven
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users