Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dataInsert = '';
- $cont = 0;
- $datosCount = count($Adatos);
- foreach ($Adatos as $id=>$datos){
- if ($dataInsert == ''){
- $dataInsert = "INSERT INTO presupuesto_financiero_real (mes,anio,lineadid,fecha,lineadato) VALUES ";
- }
- $dataInsert .= "({$datos['iMes']},{$datos['iAnio']},{$datos['did']},'{$datos['desde']}','".round($datos['valor'],2)."'),";
- if ($cont >= 4000 || $id+1 >= $datosCount){
- if ($dataInsert != ''){
- $dataInsert = substr($dataInsert,0,-1);
- }
- if ($dataInsert != ''){
- $mysqliSOL->query($dataInsert);
- }
- $cont = 0;
- $dataInsert = '';
- }
- $cont++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement