1
I need to enter multiple records with an Insert
Example:
$ids= "1,2,3,4"
$conn->prepare("INSERT INTO documento (id) VALUES (1)");
$conn->prepare("INSERT INTO documento (id) VALUES (2)");
$conn->prepare("INSERT INTO documento (id) VALUES (3)");
$conn->prepare("INSERT INTO documento (id) VALUES (4)");
Is there any loop that for example checks how many records I have in my $ids variable and does the Insert several times repeating until entering the last record of the $ids variable
Does the variable follow this pattern or can it change? Always will be 0.1.2.. ?
– Mauro Alexandre
Yes, it will always be that pattern
– Smoke Rohden