Código PHP:
$sql="select max(testdate) from production";
$consultsql=new Consultabd($localhost,$userbd,'',$_SESSION['bd']);
$result=$consultsql->executar($sql);
while($row=mysql_fetch_row($result))
{
$dataultimtest = $row['max(testdate)'];
}
mysql_free_result($result);