Problem ->DBI

Bash, Shell, PHP, Python, Perl, CGI
Post Reply
linuxfreak
Posts: 28
Joined: 2004-03-03 19:19
Location: München
 

Problem ->DBI

Post 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
rob
Posts: 82
Joined: 2002-06-03 21:53
Location: Brandenburg
Contact:
 

Re: Problem ->DBI

Post 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();
Post Reply