Re: losing mysql connection during cron job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> The script cycle is, symbolically:
>
>        foreach (recipients as batch)
>        {
>                mail() using batch of recipients;
>                mysql_query() update table;
>                sleep(60);
>        }
>        final mysql_query() update table as complete;
>
>
why don't you edit your code?

       foreach (recipients as batch)
       {
               mail() using batch of recipients;
               mysql_query() update table;
               if(mysql_errno()==ERROR_CODE_YOU_GET){
                         mysql_connect();
                         mysql_select_db();
               }
               sleep(60);
       }

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux