Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user = "root"; // A adapté
- $pass = "pass"; // A adapté
- try {
- $dbh = new PDO('mysql:host=localhost;dbname=gestioncle', $user, $pass);
- $sth = $dbh->prepare("SELECT Id_portes FROM Portes WHERE Batiment = 'Bat A'");
- $sth->execute();
- $result = $sth->fetchAll();
- $finalRes = Array('Id_portes' => $row["Id_portes"]);
- print_r($finalRes);
- } catch (PDOException $e) {
- print "Erreur : " . $e->getMessage() . "<br/>";
- die();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement