[eluser]belial.seed[/eluser]
Hi i´m having trouble generating a file out of a big resultset, i´ll explain the problem, the code i´m using works for queries that return around 5000 rows and it´s really fast, however when i try the same thing with a bigger resultset (about 4 million rows with 10 fields each), seems like i run out of time so i´ve set max_execution_time=300 on my php.ini, i´ve tried to limit the resultset to half a million, but I still have the same problem, so a little light on my way will be appreciated, thanks for your attention.
the code i´m using:
Code:
$this->load->dbutil();
$this->load->library('zip');
$query = $this->gic_inventario->inventarios2($tmp01,$tmp02,$tmp03);
$delimiter = "\t";
$newline = "\r\n";
$datosArchivo=$this->dbutil->csv_from_result($query,$delimiter,$newline);
$nombreArchivo=date("Ymd_G-i").'_file.txt';
$rutaArchivo='./aplicacion/tmp/files/';
$this->zip->add_data($nombreArchivo, $datosArchivo);
$this->zip->archive('./aplicacion/tmp/files/'.
date("Ymd_G-i").'_file.zip');
$this->zip->download(date("Ymd_G-i").'_file.zip');
PS the query takes about 2 minutes to complete.