<?php
//echo "projectName: ".$_SESSION["projectName"];
//echo "tenant_id: ".$_GET["tenant_id"];
//GET TENANT INFO


	  $sqlTenant = "select tenants.*,
					tenant_rental_rate.rental_rate,
					properties.unit_no,
					properties.id as property_id,
					properties.line1, 
					properties.line2, 
					properties.city, 
					properties.state, 
					properties.country, 
					properties.postcode,
					locations.location_name, 
					locations.id as location_id, 
					projects.project_name,
					projects.project_code,
					projects.id as project_id
					from tenants 
					inner join tenant_rental_rate on tenant_rental_rate.tenant_id = tenants.id
					inner join properties on tenants.property_id = properties.id
					inner join locations on properties.location_id = locations.id
					inner join projects on locations.project_id = projects.id
					where tenants.id = $tenant_id";

	$runTenant = mysqli_query($link, $sqlTenant);
	if($runTenant === FALSE){
		die(mysqli_error($link));
	}

	
?>