<?php 
require "../commonincludefiles.php";

if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"]))
{	

	
	$qry = "select distinct customer_orgname from lms_customer ";	
	$result=dbQuery($qry);
	
	$total = dbRows($result);
	$i=0;
	$distictData = array("count" => $total, "rows" => array());
	if	(dbRows($result) > 0) 
		   {
				$temparray = array();
				while($row = dbArray($result)){
					
					$temparray["customer_orgname"]  = $row["customer_orgname"];
					
					$distictData["rows"][$i] = $temparray;   
				$i++;
			}										
	}				   		 
 	echo json_encode($distictData);	
	
	
}
?>