On Mon, 29 Sep 2003, Kenneth Gonsalves wrote:
> my %rowdata;
> $rowdata{cols} = [EMAIL PROTECTED];
^^
you assign a reference to @cls
> push (@rows,\%rowdata);
> @cls = ();
hi
i have some data that i want to output in three columns, so i'm trying to
build a nested loop. This is the perl code:
#!/usr/bin/perl -w
use CGI;
use HTML::Template;
use strict;
use DBI;
my $q = new CGI();
my @rows = ();
my @cls = ();
my $q1 = "select id,blurb,thumb from pictures";
my $st1 =
On Mon, 15 Sep 2003, Karen J. Cravens wrote:
KJC>As is usual, I discovered this only *after* posting the question to the
KJC>list...
And after that, I realized things still aren't working quite right.
It's not the loop variables, though. It's the nested loop.
I've got globals turned on. If I'
On Sun, 14 Sep 2003, Sam Tregar wrote:
ST>Have you tried turning off global_vars? Does that solve the problem
ST>with __first__? What version of HTML::Template are you using?
Turned out it wasn't the version of HTML::Template, exactly, but the
version of Perl.
I hadn't tried turning off global
>
> I've got a __first__ that isn't acting the way I expect it...
> it's always false. I'm wondering if that's happening because
> I've got global_vars on and it's the inner loop of a two-loop nest.
You are setting loop_context_vars, aren't you?
Ben
---
On Sat, 13 Sep 2003, Karen J. Cravens wrote:
> I've got a __first__ that isn't acting the way I expect it... it's always
> false. I'm wondering if that's happening because I've got global_vars on
> and it's the inner loop of a two-loop nest.
>
> I'm betting it is, but I'm hoping someone will tel
I've got a __first__ that isn't acting the way I expect it... it's always
false. I'm wondering if that's happening because I've got global_vars on
and it's the inner loop of a two-loop nest.
I'm betting it is, but I'm hoping someone will tell me I'm wrong, because
I'd really like to leave global_
In the docs, regarding nested loops it says:
$template->param(LOOP => [{ name => 'Bobby',
nicknames => [{ name => 'the big bad wolf' },
{ name => 'He-Man' },
],
},
On Mon, Jun 24, 2002 at 08:35:25AM -0700, Roy Rubin wrote:
>I am looking to
>use the refernces that are already part of the DBI, instead of hard coding
>the variables (as in $OfficeID, etc.) I hope this makes sense.
On Monday, June 24, 2002 4:47 PM:Roger Burton West
[mailto:[EMAIL PROTECTED]] rep
Hello,
Can someone provide an example of nested loops. I have it working, but I am
using *bad* code because I have had problems with referencing.
Thanks.
Roy
[EMAIL PROTECTED]
> I sent the post to both lists - not sure which one is currently live.
---
10 matches
Mail list logo