ultraloveninja Posted June 14, 2011 Share Posted June 14, 2011 Hello! I have a script that exports rows from the DB, but for some reason it's only exporting 4k rows and not the full 9k of rows. I've run the query in a query browser and it returns all of the info, so I am not sure if this is something where it's a memory limit or what. It does produce a large 1.1MB XLS file, so I am not sure if I need to bump up the resources within the php.ini file or what? Any ideas are greatly appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/ Share on other sites More sharing options...
redixx Posted June 14, 2011 Share Posted June 14, 2011 Maybe it would be better to break it up into 2k increments or something. The first increment creates the XLS file and then the rest append to it. Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/#findComment-1229677 Share on other sites More sharing options...
ultraloveninja Posted June 14, 2011 Author Share Posted June 14, 2011 what if it was done as a CSV? would that make a difference? Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/#findComment-1229704 Share on other sites More sharing options...
redixx Posted June 14, 2011 Share Posted June 14, 2011 If it is a memory issue then no I don't see how that would make a difference. Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/#findComment-1229705 Share on other sites More sharing options...
ultraloveninja Posted June 14, 2011 Author Share Posted June 14, 2011 Hmmm, ok. It's not my code, nor something that I wrote so I'll have to dig around some more to see if there is a way to break it up and/or try a CSV file to see if it's doing the same thing. Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/#findComment-1229707 Share on other sites More sharing options...
redixx Posted June 14, 2011 Share Posted June 14, 2011 You could try echoing memory_get_peak_usage() after your script writes the file, to see how much memory it took. And then you can set a memory limit in the php.ini Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/#findComment-1229708 Share on other sites More sharing options...
ultraloveninja Posted June 14, 2011 Author Share Posted June 14, 2011 OOOH! Thanks for the tip! I will for SURE use that. Link to comment https://forums.phpfreaks.com/topic/239364-export-not-exporting-all-rows/#findComment-1229711 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.