On Wed, 2002-04-03 at 21:25, FLAHERTY, JIM-CONT wrote: > Hello, It seams I am sucessfully adding numbers to my array , but in turn > tey are blank spaces. I need Help > > My code > > > > $dbh =DBI ->connect($data_source, $username, $password) or die "cant connect > to > $data_source : my $dbh-> errstr\n"; > my $sth1 = $dbh -> prepare("select num from tests where subject = '$test' > "); > $sth1 -> execute or die " unable to execute query "; > #$sth1 -> finish; > > > $count1 = 0; > my $array_ref = $sth1->fetchall_arrayref(); > > foreach $row(@$array_ref){ > > $num = $row[0];
This should be $num = $row->[0]; or ($num) = @$row; or $num = $$row[0]; or any of a hundred different ways to say it. > > push(@numbers, $num); > $count1++; > } > > > > > > thanks You > Jim > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Today is Prickle-Prickle the 21st day of Discord in the YOLD 3168 Umlaut Zebra über alles! Missile Address: 33:48:3.521N 84:23:34.786W -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]