function getCorreoIntegrantes() { //include('../Conexion.php'); $ConexionBD = new Conexion(); $database = $ConexionBD::conectarBD(); if ($database->connect_errno) { $data = NULL; } else { $sqlSelect = ' SELECT intCorreo, intNombre'; $sqlFrom = ' FROM integrantes '; $sqlWhere = ' WHERE intActivo = TRUE '; $sqlOrder = ' ORDER BY intCorreo;'; $consulta = $sqlSelect . $sqlFrom . $sqlWhere . $sqlOrder; if ($result = $database->query($consulta)) { if ($result->num_rows > 0) { $i = 0; while ($row = mysqli_fetch_array($result, MYSQL_BOTH)) { $intCorreo = $row['intCorreo']; $intNombre = $row['intNombre']; $data[] = array('intCorreo' => $intCorreo, 'intNombre' => $intNombre); $i++; } // return $data // mysqli_free_result($result); } else { $data = NULL; } $result->close(); } $ConexionBD->desconectarDB($database); } // echo $fechaFin; return $data; }
function getCorreosInvitados() { $ConexionBDInv = new Conexion(); $database = $ConexionBDInv::conectarBD(); if ($database->connect_errno) { $data = NULL; } else { $sqlSelect = ' SELECT invCorreo, invNombre'; $sqlFrom = ' FROM invitados '; $sqlWhere = ' WHERE invActivo = TRUE '; $sqlOrder = ' ORDER BY invCorreo;'; $consulta = $sqlSelect . $sqlFrom . $sqlWhere . $sqlOrder; if ($result = $database->query($consulta)) { if ($result->num_rows > 0) { $i = 0; while ($row = mysqli_fetch_array($result, MYSQL_BOTH)) { $intCorreo = $row['invCorreo']; $invNombre = $row['invNombre']; $data[] = array('invCorreo' => $intCorreo, 'invNombre' => $invNombre); $i++; } // return $data mysqli_free_result($result); } else { $data = NULL; } //$result->close(); } $ConexionBDInv->desconectarDB($database); } return $data; }