CodeIgniter Forums

Full Version: Doubts ActiveRecord php updates multiples rows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, i have a problem whit a error: maximum size of arrays in php, $ids has a maximum and i don't know how to resolve it.
Array size is limited only by amount of memory your server has. I 'll get out of memory" error and i can't change php.ini

PHP Code:
function delete_ScormByIdPlataforma($idPlatforma)
        if (
$this->getIdScormVarsToDelete($idPlatforma) != 0)
$ids $this->getIdScormVarsToDelete($idPlatforma);
// guardar en un campo de una tabla los scormsVars a Borrar más adelante por si fueran uchisimos y no cupieran en un array
        //log_message('error', 'No se han encontrado scorms a borrar'.$this->db->_error_message().' - '.$this->db->last_query());

$this->db->from('scormvars as s');
$this->db->join('dispatch as d''s.ID_dispatch = d.ID_dispatch''INNER');
$this->db->join('licencias as l''d.ID_licencia = l.ID_licencia','INNER');
$query $this->db->get();
                foreach (
$query->result() as $fila){
$data[] = $fila->ID_dispatch;
//log_message('error', 'No se han encontrado Dispatch a borrar'.$this->db->_error_message().' - '.$this->db->last_query());
return 0;
HAve you tried to increase your memory limit value? Check this blog article:
You can try to run full delete sql with where clause..
How big is that array? You can try and split the work into batches.