Answer the question
In order to leave comments, you need to log in
How can I add data to multiple tables with a single insert into?
A piece of code that adds a record to one table, but how to add it to two at once?
// Insert new record into the contacts table
$stmt = $pdo->prepare('INSERT INTO `Client`(`id`, `surname`, `name`, `patron`, `serie`, `number`, `propiska`,`telephone`) VALUES (?,?,?,?,?,?,?,?)');/*ошибка ,удалить `банк`*/
$stmt->execute([$id, $surname, $name, $patron, $serie, $number, $propiska,$telephone,/*$ls,$balance,$date*/]);/*error*/
Answer the question
In order to leave comments, you need to log in
$stmt = $pdo->prepare('INSERT INTO `Client`(`id`, `surname`, `name`, `patron`, `serie`, `number`, `propiska`,`telephone`) VALUES (?,?,?,?,?,?,?,?)');/*ошибка ,удалить `банк`*/
$stmt->execute([$id, $surname, $name, $patron, $serie, $number, $propiska,$telephone,/*$ls,$balance,$date*/]);/*error*/
$stmt = $pdo->prepare('INSERT INTO `Client2`(`id`, `surname`, `name`, `patron`, `serie`, `number`, `propiska`,`telephone`) VALUES (?,?,?,?,?,?,?,?)');/*ошибка ,удалить `банк`*/
$stmt->execute([$id, $surname, $name, $patron, $serie, $number, $propiska,$telephone,/*$ls,$balance,$date*/]);/*error*/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question