I have the following array
:
array:30 [▼
0 => "12933"
1 => "12931"
2 => "12930"
3 => "12929"
4 => "12928"
5 => "12927"
6 => "12926"
7 => "12925"
8 => "12924"
9 => "12923"
10 => "12922"
11 => "12921"
12 => "12920"
13 => "12919"
14 => "12918"
15 => "12917"
16 => "12916"
17 => "12915"
18 => "12914"
19 => "12913"
20 => "12912"
21 => "12911"
22 => "12910"
23 => "12909"
24 => "12908"
25 => "12907"
26 => "12906"
27 => "12905"
28 => "12904"
29 => "12903"
]
My application is using a production base SQLServer
and I have another base SQLITE
that I have only 2 query tables and on that basis, a table named Notas
with only one column named Numero
.
I am trying to give a insert
to this table, in which every array
would be a record, however, since I never did it, I am not getting it, I am trying the following code:
$insertNumeroNotas = DB::connection('sqlite')
->insert('insert into Notas (Numero) values (?)', $quantidadeNotas);
where $quantidadeNotas
is array
.
I need to first iterate through this array to then give insert
, or insert
need to be given in each iteration of that array?