Last active
December 20, 2015 00:39
-
-
Save facumartig/6043498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'config/db_config.php'; | |
$sql = "SELECT * FROM events WHERE timestamp = '".$_POST['d']."' ORDER BY ID"; | |
$query = mysqli_query($link, $sql); | |
if (mysqli_num_rows($query) > 0){ | |
$data = array(); $index = 0; | |
while ($recset = mysqli_fetch_array($query)){ | |
$data[$index] = $recset; | |
$index++; | |
} | |
echo json_encode($data); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment