<?php

	require_once("config.inc.php");
	require_once("DBConnector.php");
	$db = new DBConnector(); $dbinv = $db->GetConnection();
	
	$sql="select * from s_crec where CA_DATE>='2014-08-01' and CANCELL!='1' and FLAG!='RET'";
	$result =$db->RunQuery($sql);
	while ($row = $result->fetch()){
		$sql1="select * from s_sttr where ST_REFNO='".$row["CA_REFNO"]."'";
		$result1 =$db->RunQuery($sql1);
		if ($row1 = $result1->fetch()){
		} else {
			echo $row["CA_REFNO"]."-".$row["CA_DATE"]."-".$row["CA_CODE"]."</br>";
		}
	}
?>

