daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest May 31st, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $user = "root"; // A adapté
  3. $pass = "pass"; // A adapté
  4. try {
  5.     $dbh = new PDO('mysql:host=localhost;dbname=gestioncle', $user, $pass);
  6.     $sth = $dbh->prepare("SELECT Id_portes FROM Portes WHERE Batiment = 'Bat A'");
  7.     $sth->execute();
  8.     $result = $sth->fetchAll();
  9.     $finalRes = Array('Id_portes' => $row["Id_portes"]);
  10.     print_r($finalRes);
  11. } catch (PDOException $e) {
  12.     print "Erreur : " . $e->getMessage() . "<br/>";
  13.     die();
  14. }
  15. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top