<?php
	require_once '../../../autoload.php';

	$result = array (
			"status"	=> 'KO'
	);


    $from_date	= (isset($_POST['from_date']))? $_POST['from_date'] : false;
    $to_date	= (isset($_POST['to_date']))? $_POST['to_date'] : false;

    error_log ( " from_date : ".$from_date );
    error_log ( " to_date : ".$to_date );

	$pdo = getPDO ();
		
	if ( $pdo )
	{
		// $sql = "SELECT f_update_studyalertwarning(to_timestamp(:from_date, 'YYYY-MM-DD'), to_timestamp(:to_date, 'YYYY-MM-DD'))";
		$sql = "SELECT 1";
		$s0 = $pdo->prepare ( $sql );
		// $s0->bindParam ( ':from_date',		$from_date 	);
		// $s0->bindParam ( ':to_date',		$to_date 	);

		error_log ( " T1" );
		if ( $s0->execute () )
		{
			error_log ( " T2" );
			$result['status'] ='OK';
		}
		error_log ( " T3" );
	}
	
	header('Content-type: application/json');
	
	echo json_encode ( $result );
?>