Hi, I'm getting this error in the code below:
[CODE=perl]
sub Pega_recorde {
$database = 'bundinha';
$host = 'localhost';
$usuario = 'myhumoradm';
$senha = 'my8xr2d2';
$dbh=DBI->connect("DBI:m ysql:database=$ database;host=$ host","$usuario ","$senha") or die "Can't open DB: $!";
$query="SELECT * FROM bundinha_rank";
$sth=$dbh->prepare($query ) or die $dbh->errstr if $dbh->err;
$rv=$sth->execute();
While (@row = $sth->fetchrow_array ()) {
$pontos= $row[6];
}
$rv=$dbh->disconnect;
}
[/CODE]
The problem is in the line code : $rv=$sth->execute();
I'll already verify and the database connection is OK. Please help me...I already tried almost everything....p lease help me
Thiago França da Silva (São Paulo - Brazil) email: <removed by moderator>
[CODE=perl]
sub Pega_recorde {
$database = 'bundinha';
$host = 'localhost';
$usuario = 'myhumoradm';
$senha = 'my8xr2d2';
$dbh=DBI->connect("DBI:m ysql:database=$ database;host=$ host","$usuario ","$senha") or die "Can't open DB: $!";
$query="SELECT * FROM bundinha_rank";
$sth=$dbh->prepare($query ) or die $dbh->errstr if $dbh->err;
$rv=$sth->execute();
While (@row = $sth->fetchrow_array ()) {
$pontos= $row[6];
}
$rv=$dbh->disconnect;
}
[/CODE]
The problem is in the line code : $rv=$sth->execute();
I'll already verify and the database connection is OK. Please help me...I already tried almost everything....p lease help me
Thiago França da Silva (São Paulo - Brazil) email: <removed by moderator>
Comment