  <?php require_once('../auth/auth.php');?>
<?php

  $json = array();
    $sqlQuery = "SELECT * FROM events WHERE coid='$coid' AND bid='$bid' AND brid='$brid' ORDER BY id";

    $result = mysqli_query($conn, $sqlQuery);
    $eventArray = array();
    while ($row = mysqli_fetch_assoc($result)) {
        array_push($eventArray, $row);
    }
    mysqli_free_result($result);

    mysqli_close($conn);
    echo json_encode($eventArray);

  ?>