Welcome Guest, Not a member yet? Register   Sign In
difficulty with insert_batch
#4

Not success, only now inserting the first value the 'trimestre' array:

the code changed..
Tanks guys!!


foreach ($alunos as $key => $value) {
                    
                    foreach ($value['disciplinas'] as $k => $v) {
                        $array = array();
                        $array = $v;
                    }
                    $saida_aluno[] = array (
                        'disciplinas'        => $array,
                        
                        //'nrbase'            => $value['nrbase'],
                        'nraluno'             => $value['nraluno'],
                        'nomeguerra'        => $value['nomeguerra'],
                        'nrmat'             => $value['nrmat'],
                        'serie'                => $value['serie'],
                        'trimestre'            => $value['trimestre'],
                        'turma'                => $value['turma'],
                        'nrano'                => $value['nrano'],
                        'status'            => $value['status'],     //1 ENTRADA 0  SAIDA
                        'data_geracao'     => $data_controle,
                        'nrcomunicado'     => $last_insert
                            );
                        
                
                }
                $this->db->insert_batch('cmcg_controleaps', $saida_aluno);
Reply


Messages In This Thread
difficulty with insert_batch - by n0cturn0 - 06-13-2018, 05:46 AM
RE: difficulty with insert_batch - by php_rocs - 06-13-2018, 08:16 AM
RE: difficulty with insert_batch - by dave friend - 06-13-2018, 09:46 AM
RE: difficulty with insert_batch - by n0cturn0 - 06-13-2018, 11:53 AM
RE: difficulty with insert_batch - by neuron - 06-14-2018, 01:28 AM
RE: difficulty with insert_batch - by n0cturn0 - 06-14-2018, 07:24 AM
RE: difficulty with insert_batch - by php_rocs - 06-14-2018, 07:33 AM
RE: difficulty with insert_batch - by n0cturn0 - 06-14-2018, 08:30 AM
RE: difficulty with insert_batch - by php_rocs - 06-14-2018, 10:14 AM
RE: difficulty with insert_batch - by n0cturn0 - 06-14-2018, 12:03 PM
RE: difficulty with insert_batch - by php_rocs - 06-14-2018, 03:00 PM
RE: difficulty with insert_batch - by n0cturn0 - 06-14-2018, 05:21 PM
RE: difficulty with insert_batch - by php_rocs - 06-15-2018, 08:49 AM
RE: difficulty with insert_batch - by n0cturn0 - 06-18-2018, 06:30 PM
RE: difficulty with insert_batch - by php_rocs - 06-19-2018, 07:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB