DBI tand subroutine

From: Xaver Biton (xwvwe_at_callwayonline.de)
Date: 02/19/05

  • Next message: Michael A Chase tech: "Re: DBI tand subroutine"
    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");


  • Next message: Michael A Chase tech: "Re: DBI tand subroutine"

    Relevant Pages

    • or probably..
      ... and I would like to free-thread the recieve end of it. ... ''' Initializes the server connection ... Public Sub Connect(ByVal ServerName As String, ... Dim ep As New IPEndPoint ...
      (microsoft.public.dotnet.languages.vb)
    • Re: writting an in keyword for perl
      ... noylwigymea@hotmail.com (David) wrote: ... > Does anyone know of a way to cause a sub call to recieve the ... > scalar preseeding the sub call as well as the array following? ... sometimes want to do either string matches or numerical matches, ...
      (comp.lang.perl.misc)
    • Re: Stepping Problem,
      ... Private Sub Workbook_SheetChange ... Stepping through a program will achieve the desired results, ... First, a Worksheet Change Event is recieved, this in turns calls a Sub to ... If code is allowed to run normally I will always recieve a ...
      (microsoft.public.excel.programming)
    • Re: writting an in keyword for perl
      ... > Does anyone know of a way to cause a sub call to recieve the ... > scalar preseeding the sub call as well as the array following? ... David Wall ...
      (comp.lang.perl.misc)
    • Re: Bill should have used Linux
      ... At lease he put OT in the sub. ... > It is like an internet joke that you recieve from 10 different people. ...
      (alt.os.linux.suse)