Re: Multiple queries to populate drop down list boxes.
Mark Haney <MarkH-rOuQeLG7NUhWk0Htik3J/[email protected]> Thu, 4 Oct 2012 12:53:16 +0000
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
On 09/27/2012 01:21 PM, Finn Hakansson wrote:
> Could you dump $vars (with Data::Dumper) and also show us your template,
> please?
>
Sure. In fact, that was the last thing I did before leaving work that day. Not realizing, of course, that my achy joints were going to rebel the way they did. I'm still trying to find a medication that works for me, so crap like that is bound to happen.
I added Data::Dumper here:
my @rows_shift;
while (my $row_shift = $sth->fetchrow_array() )
{
push @rows_shift, $row_shift;
}
open (FILE, "> /tmp/shifts.info") or die "can't open shifts.info: $!";
print FILE Data::Dumper->Dump([\@rows_shift]);
close FILE or die "can't close file: $!";
$sth->finish();
# End Get shift data routine
I figured I was start there to see if I was actually getting the data that far. And this is what I got:
markh@ubuhost:~$ cat /tmp/shifts.info
$VAR1 = [
'First',
'Second',
'third',
'weekend'
];
markh@ubuhost:~$
So, it appears the data is being passed to the template, I just can't quite figure out why it's not getting there. I've attached the two offending files the perl and the template. Something I probably should have done earlier. I was hoping it was something a new set of eyeballs would notice.
--
Mark Haney
Software Developer/Consultant
AB Emblem
markh-rOuQeLG7NUhWk0Htik3J/[email protected]
Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates