I just realized something, doesnt fetch_array return column values and not column 
names? And data has to be in this format

$template->param(EMPLOYEE_INFO => [ 
{ name => 'Sam', job => 'programmer' },
{ name => 'Steve', job => 'soda jerk' },
]);

 I tried printing every dbi fetch results and they dont turn out that. just {HASH} and 
bunch of numbers. 



----- Original Message ----- 
From: "Norikatsu Shigemura" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 23, 2002 3:50 AM
Subject: Re: [htmltmpl] HTML-Template and DBI


> Wrote by "Smejkal Petr" in 2002/09/23 16:36 JST
> >> Try:
> >> my @rows = ();
> >> while ( my $row = $sth->fetchrow_hashref() ) {
> >>   my %data = %$row;
> >>   push @rows, \%data;
> >> }
> >> $template->param(ROWS => \@rows);
> 
> Hum...  fetchall_arrayref({}) is same function.
> 
> Try:
> $template->param(ROWS => $sth->fechall_arrayref({}));
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Html-template-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/html-template-users



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to