Hello everyone,

   I know this is something stupid.  I guess I am brain dead this
morning.


here is the code....


eval{
    $dbh{'info'} = $dbh{'conn'}->prepare(qq{
                        SELECT User, Host from db
                        WHERE Db = ?
                        }) || die $DBI::errstr;
    $dbh{'info'}->bind_param(1, $db, SQL_VARCHAR);
    $dbh{'info'}->execute();
    $dbh{'info'}->bind_columns(\$dbuser, \$host);
        
    while($dbh{'info'}->fetch){
        $drop{'user'} = $dbuser;
        $drop{'host'} = $host;
    }
    $dbh{'info'}->finish();             
};


But when I issue:

foreach $dbuser(sort keys %drop){
    print "$drop{'user'} \-\> $drop{'host'}\n";
}
    

I get 

ckell -> localhost
ckell -> localhost


twice, even though there is one entry in the db table.

any thoughts?

I know it's something very simple, always is. But i can't put my finger
on it.



Thanks,
Chad 

Reply via email to