a guest May 22nd, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $conn = pg_connect(" user= password= dbname=") or die(pg_last_error());
- $date = '04/30/2010';
- $site = 0;
- $distance = 1000;
- $requete = "SELECT idsite FROM site WHERE typesite = 'IAATO' AND idsite NOT IN".
- "(SELECT idsite FROM planification WHERE dateplanif = $1 AND ordre = 2) AND idsite IN".
- "(SELECT idsite FROM DISTANCE WHERE sit_idsite = $2 AND milesnautiques <= $3)" ;
- $reponse = pg_prepare($conn, "", $requete) or die(pg_last_error());
- $reponse = pg_execute($conn, "", array($date, $site, $distance));
- echo pg_num_rows($reponse);
- pg_close($conn) or die("lol");
RAW Paste Data