Created
August 18, 2017 15:51
-
-
Save unoframille/4e2aa458775592b37bd1502284c10755 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
$requete = $database->select( | |
'embassy_calendario', | |
[ | |
"embassy_calendario.id_stanza", | |
"embassy_calendario.id_insegnante" | |
], | |
" WHERE | |
(start >= '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND start < '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') OR | |
(end > '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND end <= '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') OR | |
(start >= '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND end <= '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') OR | |
(start < '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND end > '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') | |
" | |
); | |
// sending the encoded result to success page | |
echo json_encode($requete); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment