Re: [PHP-DB] Large Arrays in a batch procedure

2004-04-08 Thread Bruno Ferreira
antonio bernabei wrote:

The work is to apply a formula to some fields of each record and
update another field of the same table.
 

  
   If this is the case, why don't you simple use an UPDATE query?

   Example: [ UPDATE table SET some_field= 
100*0.1/other_field+yet_another_field ]

   No PHP involved here, you just use some SQL interface to your server...

   Bruno Ferreira

---
[This E-mail scanned for viruses by Declude Virus]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Large Arrays in a batch procedure

2004-04-07 Thread Viorel Dragomir
First it's not such a good idea to show 30k records to a browser.. If you use this 
script in console it's ok.
I don't think that the problems comes from the data size.. check your for.. maybe 
has an infinite loop.

Anyway if the problem comes from the data size you can find out by reading only 1k 
records.

good luck
  - Original Message - 
  From: antonio bernabei 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, April 07, 2004 11:22 AM
  Subject: [PHP-DB] Large Arrays in a batch procedure


  Hi,
  I have a problem. On a small lan I need to process a table with about 3
  records. The work is to apply a formula to some fields of each record and
  update another field of the same table.
  I run php on a win2000 professional system and the first approach was to
  make a for cycle in which I apply the formula to all records and echo the
  result of the formula, just to show that the work is going on.
  But I get into a timeout of the system after 30 seconds
  Which is the right approach to this type of work, let's call it batch work?
  Thank you
  Antonio Bernabei

  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php