On 10/05/2012 11:38 AM, Shlomi Fish wrote:
Hi Mark,
please include a self-contained, minimalised, reproducing example, so we
can see what you are doing wrong. Moreover, sometimes minimalising the
code to something more self-contained helps you find the problem.
Regards,
Shlomi Fish
I will see what I can do, this isn't something that seems to be
particularly portable, so bear with me. I do have more info to share
though. I realized I needed to add a field to the 'shifts' data, which
makes it identical to the 'factories' data insomuch as it's now an array
just like 'factories'. However, this doesn't fix the problem. And
that's really bizarre. Here's my code:
my @rows_factory;
while ( my @factory_data = $sth->fetchrow_array() )
{
push @rows_factory, {'id' => $factory_data[0], 'abbr' =>
$factory_data[1]};
}
$sth->finish();
# End of Factory codes routine
# Get Shift data (names,days of week, times) for use in the pulling
of report data for the shifts
$sql = qq/SELECT DISTINCT shift_name, factory_id from shifts/;
$sth = $dbh->prepare($sql);
$sth->execute();
my @rows_shifts;
while ( my @shift_data = $sth->fetchrow_array() )
{
push @rows_shifts, { 'factory_id' => $shift_data[1], 'shift_name' =>
$shift_data[0]};
}
$sth->finish();
# End Get shift data routine
So, this is obviously a problem bigger than just this one routine. But
bugger me if I know where to go from here.
--
Mark Haney
Software Developer/Consultant
AB Emblem
ma...@abemblem.com
Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/