Welcome Guest, Not a member yet? Register   Sign In
MySQL Conversion (Unbuffered)
#1

[eluser]eedfwChris[/eluser]
I am trying to figure out a way to send a very large select statement (40000+ rows) to either xml, xls (tab delimited), or even using this library for creating true .xls.

The problem I have is that storing the entire result easily maxes out the memory of the server so...

Is there a way to go directly from MySQL to any of the latter formats?
#2

[eluser]jabbett[/eluser]
Sure-- you can use MySQL's SELECT ... INTO OUTFILE command to get your output written directly to the filesystem.

http://dev.mysql.com/doc/refman/5.0/en/s...#id2838716
#3

[eluser]eedfwChris[/eluser]
I was actually able to use mysql_unbuffered_query() to get my resultset. Though I didn't follow CI's OOP for creating it...

Does anyone know how to make $this->db->query() run as unbuffered (I guess you would have to use the custom functions method but not sure how to put it back as an object).




Theme © iAndrew 2016 - Forum software by © MyBB