i nned ur help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    i nned ur help



    HI ,

    I'll give u my perl codeings . I need to add these out puts to a hash (
    array ) , but now already i have added that into a normal array . Could
    u help me pull those results in to a hash .

    Actually i'm using perl .

    #! /usr/bin/perl -w
    use strict;
    use DBI;

    my ($dbh, $sth);
    #my @array_data;
    #my $counter = 0;

    $dbh = DBI->connect ("DBI:mysql:SMS C;localhost","r oot","smsc") ||
    die "Error Opening DataBase: $DBI::errstr\n" ;
    print " Successfully Connected \n ";

    $sth = $dbh->prepare("SELEC T ServiceNo, ServicePort,
    ServiceString FROM SmsIndex;") ||
    die " Prepare failed: $DBI::errstr\n" ;
    $sth->execute() ||
    die "Unable to execute query: $DBI::errstr\n" ;

    my $matches=$sth->rows();

    unless ($matches) {
    print "Sorry, there r no matches\n";
    }
    else {
    print "$matches matches found: \n";

    while (my @row = $sth ->fetchrow_array ) {
    print "@row\n";
    #@array_data[$couter] = @row;
    #$counter++;


    }

    }



    $sth->finish();

    $dbh->disconnect || die "Failed to disconnect\n";


    pls help me .

    Thanx
    chandana






    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw

Working...