1
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 called Notas
with only one column of name Numero
.
I’m trying to give a insert
in this table, where each array
would be a record, however, as I never did this, I’m not getting it, I’m trying the following code:
$insertNumeroNotas = DB::connection('sqlite')
->insert('insert into Notas (Numero) values (?)', $quantidadeNotas);
in which $quantidadeNotas
is the array
.
I need to first iterate through this array and then give the insert
, or the insert
needs to be given in each iteration of that array?
fjurr gave the right answer?
– novic
gave yes Virgilio, thanks anyway
– fjurr
if you can accept as a reply @fjurr
– novic
ready, I had forgotten it... thanks!
– fjurr