nuevo sistema de busqueda

parent 1b177541
...@@ -13,37 +13,37 @@ if (isset($_POST['clave_escuela'])) { ...@@ -13,37 +13,37 @@ if (isset($_POST['clave_escuela'])) {
$_SESSION["longitude"] = ""; $_SESSION["longitude"] = "";
} }
$sql = 'SELECT * FROM Inicial WHERE CV_CCT ="' . $_POST['clave_escuela'] . '"'; $sql = 'SELECT * FROM Inicial WHERE CV_CCT ="' . $_SESSION['clave_escuela'] . '"';
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
} else { } else {
$sql = 'SELECT * FROM Preescolar WHERE CV_CCT ="' . $_POST['clave_escuela'] . '"'; $sql = 'SELECT * FROM Preescolar WHERE CV_CCT ="' . $_SESSION['clave_escuela'] . '"';
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
} else { } else {
$sql = 'SELECT * FROM Primaria WHERE CV_CCT ="' . $_POST['clave_escuela'] . '"'; $sql = 'SELECT * FROM Primaria WHERE CV_CCT ="' . $_SESSION['clave_escuela'] . '"';
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
} else { } else {
$sql = 'SELECT * FROM Secundaria WHERE CV_CCT ="' . $_POST['clave_escuela'] . '"'; $sql = 'SELECT * FROM Secundaria WHERE CV_CCT ="' . $_SESSION['clave_escuela'] . '"';
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
} else { } else {
$sql = 'SELECT * FROM Media WHERE CV_CCT ="' . $_POST['clave_escuela'] . '"'; $sql = 'SELECT * FROM Media WHERE CV_CCT ="' . $_SESSION['clave_escuela'] . '"';
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
} else { } else {
$sql = 'SELECT * FROM Superior WHERE CV_CCT ="' . $_POST['clave_escuela'] . '"'; $sql = 'SELECT * FROM Superior WHERE CV_CCT ="' . $_SESSION['clave_escuela'] . '"';
$result = $conn->query($sql); $result = $conn->query($sql);
if ($result->num_rows > 0) { if ($result->num_rows > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment