<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 12/30/2018
//
include ("check_session.php");

$event_id = $_POST['event_id'];

$query = "SELECT * FROM " . BWB_TABLE_PREFIX . "events AS T1 LEFT JOIN " . BWB_TABLE_PREFIX . "locations AS T2 ON T1.location_id = T2.location_id WHERE event_id = :event_id";
$stmt = $bwb_dbh->prepare($query);
$stmt->execute(array(':event_id' => $event_id));

if ($stmt->rowCount() > 0)
{
	$row = $stmt->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT);
	print json_encode($row);
}
else
	echo "-no data-";
?>