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

	$result = array (
			"status"	=> 'KO',
			"results"	=> -1
	);
	
	$pdo = getPDO ();
		
	if ( $pdo )
	{
		$init_id				= -1;
				
		if ( isset($_POST['init_id']) 		)		$init_id 		= $_POST['init_id'];

		$sql = "delete from info_to_extract_init where init_id = ".$init_id.";";

		$s0 = $pdo->prepare ( $sql );

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