arcnon has asked for the wisdom of the Perl Monks concerning the following question:
I cant seen to figure out how to access the the data in the DBI object and get it back in.
$Query_Statement=" SELECT fname,lname,address,city,state,zip,phone,email FROM main ORDER by lname,fname;"; my $DataOut = $DBHandle->prepare($Query_Statement); $DataOut->execute(); foreach my $row_ref (@$DataOut->fetchrow_array){ my $fname = @$row_ary[0]; my $lname = @$row_ary[1]; my $total += length($fname); my $total += length($lname); if ((length($fname) + length($lname)) > 18){ my $Fintial = substr($fname,0,1); if ((length($Fintial) + length($lname)) > 18){ $lname = substr($lname,0,16); } $row_ary[0] = $Fintial; $row_ary[1] = $lname; } else{ next; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: accessing data in DBI object
by polettix (Vicar) on Apr 14, 2005 at 14:53 UTC | |
Re: accessing data in DBI object
by RazorbladeBidet (Friar) on Apr 14, 2005 at 14:58 UTC | |
Re: accessing data in DBI object
by arturo (Vicar) on Apr 14, 2005 at 15:16 UTC | |
Re: accessing data in DBI object
by rnahi (Curate) on Apr 14, 2005 at 15:40 UTC | |
by arcnon (Monk) on Apr 14, 2005 at 17:12 UTC | |
Re: accessing data in DBI object
by JediWizard (Deacon) on Apr 14, 2005 at 15:16 UTC | |
by arcnon (Monk) on Apr 14, 2005 at 17:06 UTC | |
by Mr. Muskrat (Canon) on Apr 15, 2005 at 01:37 UTC |
Back to
Seekers of Perl Wisdom