| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
- $db = "(DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = P-BDD-16)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = SIGCG50)
- )
- )";
- // Connexion au service
- $conn = oci_connect('ELIGIBILITE_R', 'H6nmb0KCwR', $db);
- if (!$conn) {
- $e = oci_error();
- echo 'Not connected';
- echo trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
- }
- $x = -1.109669152209201;
- $y = 49.102353729303125;
- $query1 = "Select A.Id_Zapm_Partielle From SIG_ANT.Ftth_Mn_Zapm_Partielle a WHERE SDO_CONTAINS(a.GEOMETRY, Mdsys.Sdo_Geometry(2001,4326,Mdsys.Sdo_Point_Type(".$x.", ".$y.", Null), Null, Null)) = 'TRUE'";
- $query2 = "SELECT * FROM SIG_ANT.Ftth_Mn_Zapm_Partielle";
- $query3 = "Select count(*) From SIG_ANT.Ftth_Mn_Zapm_Partielle";
- $query = $query1;
- $stid = oci_parse($conn, $query);
- if (!$stid) {
- echo '<div style="color:red;">';
- $e = oci_error($conn); // Pour les erreurs oci_parse, passez le gestionnaire de connexion
- trigger_error(htmlentities($e['message']), E_USER_ERROR);
- echo '</div>';
- }
- $r = oci_execute($stid);
- if (!$r) {
- echo '<div style="color:red;">';
- $e = oci_error($stid); // Pour les erreurs oci_execute, passez le gestionnaire de connexion
- print htmlentities($e['message']);
- print "\n<pre>\n";
- print htmlentities($e['sqltext']);
- printf("\n%".($e['offset']+1)."s", "^");
- print "\n</pre>\n";
- echo '</div>';
- }
- echo "<table border='1'>\n";
- while ($row = oci_fetch_array($stid, OCI_BOTH)) {
- echo "<tr>\n";
- foreach ($row as $item) {
- echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "") . "</td>\n";
- }
- echo "</tr>\n";
- }
- echo "</table>\n";
- ?>
|