Hi All!

Have any of you faced a similar problem and if so how did you fix it?

----------------------------------------------------------------
The code that I have written is :

.....
$sth = $dbh->prepare("SELECT * FROM MY_TABLE");
$sth->execute || die $sth->errstr;
while (my $ref = $sth->fetchrow_hashref())
{
  ......
}
$sth->finish();
......
----------------------------------------------------------------
>From time to time when I run this script, I get the following error :

DBD::mysql::st execute failed: Lost connection to MySQL server during query.

----------------------------------------------------------------
So, the problem is in the string : $sth->execute || die $sth->errstr;
Sometimes it works fine, but sometimes I get this error. What is the reason?

Please, help me.

Thanks in advance.

- Ksenia


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply via email to