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:SMSC;localhost","root","smsc") ||
       die "Error Opening DataBase: $DBI::errstr\n";
       print " Successfully Connected \n ";

       $sth = $dbh->prepare("SELECT 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";
                       [EMAIL PROTECTED] = @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/[EMAIL PROTECTED]

Reply via email to