<?php
session_start();
include("../../php_crud/my_class.php");
$obj = new my_class();
extract($_POST);

$cond = "WELL_ID='$well_id' AND TO_CHAR(DT, 'YYYY') BETWEEN '$from_year' AND '$to_year' ORDER BY DT ASC";

$res = array();

foreach($obj->View_colmn_By_Cond("HYDROLOGY.GWT_DILY_TBL@HYDRO10","DT,WATER_TBL",$cond) as $gw_weekly_info){
	$sel_date = $gw_weekly_info['DT'];
	$sel_wt_data = $gw_weekly_info['WATER_TBL'];
	$res[] = array("$sel_date","$sel_wt_data");
}
if(count($res)>0){
	echo $datas = json_encode($res);
}
else{
	$res[] = array('','');
	echo $datas = json_encode($res);
}	
?>