SHARE
TWEET

Untitled

a guest May 22nd, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $conn = pg_connect(" user= password= dbname=") or die(pg_last_error());
  4.  
  5. $date = '04/30/2010';
  6. $site = 0;
  7. $distance = 1000;
  8. $requete = "SELECT idsite FROM site WHERE typesite = 'IAATO' AND idsite NOT IN".
  9.             "(SELECT idsite FROM planification WHERE dateplanif = $1 AND ordre = 2) AND idsite IN".
  10.             "(SELECT idsite FROM DISTANCE WHERE sit_idsite = $2 AND milesnautiques <= $3)" ;
  11. $reponse = pg_prepare($conn, "", $requete) or die(pg_last_error());
  12. $reponse = pg_execute($conn, "", array($date, $site, $distance));
  13.  
  14. echo pg_num_rows($reponse);
  15.  
  16.  
  17. pg_close($conn) or die("lol");
  18. ?>
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