Page 1 of 1

Problem ->DBI

Posted: 2004-04-26 20:31
by linuxfreak
Hi,

an was kann das liegen:

DBD::mysql::st execute failed: MySQL server has gone away at ./statistik2.pl line 32.
DBI::db=HASH(0x82d58c8)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at ./statistik2.pl line 20.
cannot exucte query 'select login from users where id='3'' at ./statistik2.pl line 32.

Gruss

Sebastian

Re: Problem ->DBI

Posted: 2004-04-28 14:27
by rob
Hi,
schließe mal das Statementhandle vor dem Datenbankhandle:

Code: Select all

$sth=$dbh->prepare("SELECT ...");
while($sth->fetchrow_hashref())
        {
        ...
        }
$sth->finish();
$dbh->disconnect();