1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
$req1 = $bdd->prepare('INSERT INTO driver (description) VALUES (:description)');
$req1->execute(array(
'description'=>$description,
));
$last_id = $bdd->lastInsertId();
$req1->closeCursor();
$req2 = $bdd->prepare('
INSERT INTO driver_client_communicate (phone,driver_id) VALUES (:phone,:last_id)
');
$req2->execute(array(
'phone'=>$phone,
'last_id'=>$last_id
));
$req2->closeCursor();
$req3 = $bdd->prepare('
INSERT INTO driver_client_detail (email,pass,date_inscription,first_name,last_name,company,driver_id) VALUES (:driver_email,:pass,:date_inscription,:first_name,:last_name,:company,:last_id)
');
$req3->execute(array(
'driver_email'=>$driver_email,
'pass'=>$pass,
'date_inscription'=>$date_inscription,
'first_name'=>$first_name,
'last_name'=>$last_name,
'company'=>$company,
'last_id'=>$last_id
));
$req3->closeCursor(); |
Partager