too many rows breaking download |
[eluser]alberto24[/eluser]
Hi - I am having a problem with one of my customers - they have about 5,000 rows in the database and when I try to run the code to create a file (csv), in firefox it immediately goes to a blank white page and in IE i get a 500 error. customers with lesser amounts of rows still work fine. Any ideas on how to fix this so it works? Here's my code: Code: function itemscsvdownload() I removed some of the other data bits just to make it clearer. Any help is very much appreciated. Thanks!
[eluser]pistolPete[/eluser]
Enable error displaying / logging to see what's going on. It's probably a memory issue, try increasing memory_limit in your php.ini Btw: Did you know there is a function csv_from_result() ? See the user guide: user_guide/database/utilities.html
[eluser]alberto24[/eluser]
thanks pistol - I upped the memory to 64mb and it seems to work now. and i will check out the function as well - appreciate the help
[eluser]TheFuzzy0ne[/eluser]
It may benefit you more to avoid using result objects in this instance, and instead use the database result directly. I think that uses much less memory, since the resources don't actually contain the data. I might be wrong though. I think that the fact that you're views are all buffered will be consuming a lot of RAM also. |
Welcome Guest, Not a member yet? Register Sign In |