Ancora una richiesta. come faccio a fare il ciclo while solo 1 volta, quindi togliere nella select il test sulla data e ora, perche' tanto leggendolo per LOGTSM desc prenderebbe giustamente l'ultimo record.

solo che non so come modificare il while e l' IF in modo da fargli fare il ciclo solo una volta.
Se metto while(1) [che brutto modo di programmare] non funziona, ho provato a togliere
sia il while che l'if, speravo che impostasse i dati solo q volta, ma niente.


$sql = " SELECT CAST(LOGLKN AS CHAR(10) CCSID 280) ecc..

FROM VAM400.LOGMON00F where LOGLKN = '$_SESSION[costumerLOGLKN]' and logdms = '2007-09-07' and logoms > '14.13.00' order by logtsm desc ";

$stmt = db2_exec($dbh, $sql, array('cursor' => DB2_SCROLLABLE));

SUGGERIMENTO PER FARE QUESTO SOLO 1 VOLTA.

while ($row = db2_fetch_array($stmt))
{
if(!$row=="") {
$costumerLOGDMS = $row[5];
$costumerLOGOMS = $row[6];
$costumerLOGTSM = $row[7];
$costumerLOGTRE = $row[10];
$costumerLOGLKN = $row[11];
$costumerLOGRMS = $row[9];
$costumerLOGSTJ = $row[12];
$costumerLOGDIF = $row[21];
$costumerLOGINO = $row[15];
$costumerLOGJOL = $row[14];
$costumerLOGLAG = $row[16];

?>

Ancora una volta grazie.
Ciao