0) { $rspes = stripSlashes($_POST['spqy']); echo "
Creation of tables ...

" . str_replace("\r\n","
",$rspes) . "

"; $spres = mysqli_query($con, $rspes); } } echo "\n
\n"; if (isset($_POST['spqy2'])) { if (strlen($_POST['spqy2']) > 0) { $rspes = stripSlashes($_POST['spqy2']); echo "
CREATE PROCEDURE GetLMax ...

" . str_replace("\r\n","
",$rspes) . "

"; $spres = mysqli_query($con, $rspes); } } else { $mone="area_polygon_mysql.php"; $moref="^polyid,mapid,onepolygon"; $extrasql="SELECT CONCAT('If 1 Polygon1 and Polygon2 cross=',CAST((" . $mfp . "CROSSES((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))), CONCAT('If 1 Polygon1 and Polygon2 are disjoint=',CAST((" . $mfp . "DISJOINT((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))), CONCAT('If 1 Polygon1 and Polygon2 are spatially equal=',CAST((" . $mfp . "EQUALS((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))), CONCAT('If 1 Polygon1 and Polygon2 intersect=',CAST((" . $mfp . "INTERSECTS((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))), CONCAT('If 1 Polygon1 and Polygon2 overlap=',CAST((" . $mfp . "OVERLAPS((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))), CONCAT('If 1 Polygon1 and Polygon2 touch=',CAST((" . $mfp . "TOUCHES((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))), CONCAT('If 1 Polygon1 is within Polygon2=',CAST((" . $mfp . "WITHIN((SELECT p.onepolygon FROM POLYGONS p WHERE p.polyid=1), (SELECT q.onepolygon FROM POLYGONS q WHERE q.polyid=1))) AS CHAR(1))) FROM POLYGONS WHERE polyid=1;"; } if (isset($_POST['spqy3'])) { if (strlen($_POST['spqy3']) > 0) { $rspes = stripSlashes($_POST['spqy3']); echo "
CREATE PROCEDURE GetPlaceMax ...

" . str_replace("\r\n","
",$rspes) . "

"; $spres = mysqli_query($con, $rspes); } } if (isset($_POST['spqy4'])) { if (strlen($_POST['spqy4']) > 0) { $rspes = stripSlashes($_POST['spqy4']); echo "
CREATE PROCEDURE AddLine ...

" . str_replace("\r\n","
",$rspes) . "

"; $spres = mysqli_query($con, $rspes); } } $res = stripSlashes($_POST['qy']); echo "

" . str_replace("\r\n","
",$res) . "

"; $mres = mysqli_query($con, explode(";", $res)[0]); if (sizeof(explode(";", $res)) > 1) { mysqli_close($con); $con=mysqli_connect($ourhost, $ouruser, $ourpassword); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } mysqli_select_db($con, $_POST['db']); $mres = mysqli_query($con, explode(";", $res)[1]); } ?>
Query results ",$_POST['qy']); ?>
Error: " . mysqli_error($con) . ""); elseif (mysqli_num_rows($mres) == 0): echo("Query executed successfully"); else: ?> " . $afs[$ii] . ""; } ?> "); $r_array = mysqli_fetch_row($mres); for ($jj = 0; $jj < mysqli_num_fields($mres); $jj++) { echo(""); } echo(""); } if ($extrasql != "") { if (1 == 1) { $tbits=" document.getElementById('textrasql').innerHTML=\"
Query results " . str_replace("\r\n","
",$extrasql) . "

" . $r_array[$jj] . "
"; $tbitstwo=" document.getElementById('textrasqltwo').innerHTML=\"
Query results " . str_replace("\r\n","
",$extrasql) . "

"; } else { echo "

Query results " . str_replace("\r\n","
",$extrasql) . "

"; } mysqli_select_db($con, $_POST['db']); $mres = mysqli_query($con, $extrasql); for ($ii = 0; $ii < mysqli_num_rows($mres); $ii++) { if (1 == 1) { $tbits.=''; $tbitstwo.=''; } else { echo(''); } $r_array = mysqli_fetch_row($mres); for ($jj = 0; $jj < mysqli_num_fields($mres); $jj++) { if (1 == 1) { $tbits.=""; $tbitstwo.=""; } else { echo(""); } } if (1 == 1) { $tbits.=''; $tbitstwo.=''; } else { echo(''); } } } ?>
" . $r_array[$jj] . "" . $r_array[$jj] . "" . $r_array[$jj] . "


\"; " . $tbitstwo . "\"; \n"; } echo 'Back for more'; ?>