<?php
       
	require_once("db.php");
	require_once('PHPMailer/class.phpmailer.php');
	

	function calculDuration()
	{
		$assets_id= 140;
		$query = "SELECT * FROM tbl_track WHERE assets_id = '$assets_id' ORDER BY id DESC LIMIT 0,1";
		$res = mysql_query($query) or die(mysql_error().":".$query);
		if(mysql_num_rows($res) == 1)
		{
			$row = mysql_fetch_array($res);
			echo $row['add_date'];
		}
			
		die();
	}
	
	calculDuration();
?>	