<?php

	$db_host    = "analogdepat.mysql.db";
   	$db_user   = "analogdepat";
 	$db_pass   = "Un92pac007";
	$db_name   = "analogdepat";

	$objConnect = mysql_connect($db_host, $db_user , $db_pass) or die(mysql_error());
	$objDB = mysql_select_db($db_name);
	$strSQL = "SELECT * FROM customer  ";
	$objQuery = mysql_query($strSQL) or die (mysql_error());
	$intNumField = mysql_num_fields($objQuery);
	$resultArray = array();
	while($obResult = mysql_fetch_array($objQuery))
	{
		$arrCol = array();
		for($i=0;$i<$intNumField;$i++)
		{
			$arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i];
		}
		array_push($resultArray,$arrCol);
	}
	
	mysql_close($objConnect);
	
	echo json_encode($resultArray);
?>