You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
451 B

<?php
// Require DB Connection
require_once('connect.php');
//print_r($_REQUEST);
$token = $_REQUEST['token'];
list($user_id) = explode(".", $token);
// Get ALl Event
$sth = $dbh->prepare("SELECT * FROM events WHERE events.date BETWEEN ? AND ? AND accountid in ('system','".$user_id."') ORDER BY events.date ASC");
$sth->execute(array($_GET['start'], $_GET['end']));
$result = $sth->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($result);