Answer the question
In order to leave comments, you need to log in
How to add all Ivan Ivanovich with one request?
There is an array that needs to be entered into the database:
$people = array('Иван Иваныч', 'Сергей Сергеич', 'Сидор Сидорович');
for(){
$b=$pdo->prepare(" INSERT INTO `organization` SET name=:name ");
$b->bindParam(":name",$people[$i]);
$b->execute();
}
Answer the question
In order to leave comments, you need to log in
Something like this is correct:
$people = array('Иван Иваныч', 'Сергей Сергеич', 'Сидор Сидорович');
$b=$pdo->prepare(" INSERT INTO `organization` SET name=:name ");
for(){
$b->bindParam(":name",$people[$i]);
$b->execute();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question