KevySaysBeNice
[H]ard|Gawd
- Joined
- Dec 7, 2001
- Messages
- 1,452
Hi all! Thanks in advance for any pro-tips!
I've got around, let's say, 3000 records (rows) in a database that I have to process. This will most likely mean making 3000-6000 database calls, looping through stuff, using switch statements, comparing strings, etc.
Basically, a lot of data massaging, and a lot of DB traffic.
Now, maybe 3000 records and 6000 database calls isn't a problem, but my concern is if doing this all with a single function call is a bad idea, and if so how I should do it?
I basically have a function,
which kicks everything off. It creates instances of objects, which create other instances of objects, and loops through stuff, and compares stuff, etc.
Is this OK? Will I have problems? Is there a better way to be doing this (assuming all of the processing and data massaging is necessary of course!)
I've got around, let's say, 3000 records (rows) in a database that I have to process. This will most likely mean making 3000-6000 database calls, looping through stuff, using switch statements, comparing strings, etc.
Basically, a lot of data massaging, and a lot of DB traffic.
Now, maybe 3000 records and 6000 database calls isn't a problem, but my concern is if doing this all with a single function call is a bad idea, and if so how I should do it?
I basically have a function,
Code:
$this->execute();
which kicks everything off. It creates instances of objects, which create other instances of objects, and loops through stuff, and compares stuff, etc.
Is this OK? Will I have problems? Is there a better way to be doing this (assuming all of the processing and data massaging is necessary of course!)