I need to select the maximum value from a table , as described below , but do not return anything. I use PHP / SQL Server with library ADODB.
<?php
session_start();
//connessione al DB
include("dati_db.inc.php");
include ("init.php");
$qry = "select (IDSQL) from test.dbo.TTS_ext_ticket";
echo $qry;
$newrecordSet = $db->Execute($qry);
if ($db->ErrorMsg() != '') { echo $db->ErrorMsg().' '.$condition; return;}
$ID_TICKET=$recordSet->fields["idticket"];
echo $ID_TICKET;
?>