Hi,
I am currently writing a script which interacts with databases. I have written a class for this for a new project im working on, but have come up against a potential problem and im not sure which way to go.
So I run a query and it returns a single result, that is returned via an array to the page that called it. When I run a query which returns multiple rows, is it better to:
a. create a multi dimensional array with the details in and then return this big array of data back to the page that called it.
or
b. have the page that called the query loop through the output row by row?
at the moment im option for solution a, but i wondered if there would be any downsides? memory limits reached etc if there is a huge amount of data being passed?
Hope someone can point me in the right direction 😕
Thanks 🙂