Hi All!

Have any of you faced a similar problem and if so how did you fix it?
Please, recommend me something.

----------------------------------------------------------------
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


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to