DBI tand subroutine
From: Xaver Biton (xwvwe_at_callwayonline.de)
Date: 02/19/05
- Previous message: Bill Costa: "Using Oracle's Perl tree instead of OS supplied distribution..."
- Next in thread: Michael A Chase tech: "Re: DBI tand subroutine"
- Reply: Michael A Chase tech: "Re: DBI tand subroutine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: dbi-users@perl.org Date: Sat, 19 Feb 2005 20:25:23 +0100
Hi,
wht's wrong with the following code, I should recieve
'49201','49203',
'49','49203',
'49203','49203'
and if I don't use the sub I do that, but if I use the sub I recieve only
'491'
Thks.
Xaver
##snip##
my $zone_area_code = $dbh->prepare(q{
SELECT
zone_area_code.area_code_from,
zone_area_code.area_code_to
FROM
zone_area_code
WHERE
zone_area_code.area_code_to = ?
}) or die "can not prepare call_cdrs: $DBI::errstr";
sub area{
my $para = @_;
$zone_area_code->execute($para) or die;
while (my @zone_area_code_row = $zone_area_code->fetchrow_array){
my $area_code_from = $zone_area_code_row[0];
my $area_code_to = $zone_area_code_row[1];
print $area_code_from, $area_code_to;
}
}
area("49203");
- Previous message: Bill Costa: "Using Oracle's Perl tree instead of OS supplied distribution..."
- Next in thread: Michael A Chase tech: "Re: DBI tand subroutine"
- Reply: Michael A Chase tech: "Re: DBI tand subroutine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|