in reply to Re^2: Can insert but not select
in thread Can insert but not select

And what behavior do you see from this?

Note that fetchrow_arrayref always returns the same array reference (see the DBI documentation). That means if you want to store all the rows (as you appear to be attempting), you have to copy the array.

while(my $color_test = $sth->fetchrow_arrayref) { push @color_test, [ @{$color_test} ]; }

Replies are listed 'Best First'.
Re^4: Can insert but not select
by zoophagous (Novice) on Jan 03, 2009 at 05:49 UTC
    The behavior I am seeing is the foreach loop hangs.

    The loops executes if I put an insert statement in place of the select. Or will execute if I select from a different table.

    If I put a print statement below the $sth execute it doesn't print and the loop doesn't iterate.
      Digging around on the mysql boards I found out others have this problem as well. All, like me, are running active perl on windows boxes and using the mysqlPP driver. I switched to the mysql driver and presto - works like a champ.

      The mysqlPP driver is part of the default active perl PPM set. The mysql PPM has to be downloaded from University of Winnipeg.

      Thanks for the assistance and hope this helps someone digging around for the answer!