Mar 3, 2010, 10:01 AM
Post #2 of 5
Sorry to say, but that's a very convoluted and inefficient approach.
Re: [sha37] Fetching one row at a time
[In reply to]
Start by adding this to both scripts.
Those pragmas should be included in every Perl script you write, and will point out lots of coding mistakes.
Remove the empty prototype definitions. Prototypes should not be used unless you know what they're used for and when they should be used.
Don't use '&' when calling a sub unless you know, understand and want its side effects.
The getqueryresults() sub should either return the complete dataset to the caller in a single call so that the caller can process it, or it should loop over and process the data itself.
If you really want to continue doing it this way, then you need to use the limit clause and keep track of and pass back and forth the record offset numbers.
(This post was edited by FishMonger on Mar 3, 2010, 10:01 AM)