$sql = " select distinct loglkn from vam400 order by loglkn desc " ;

LOGLKN e' il nome del campo della tabella
vam400 e' il nome della libreria
e logmon00f e' il nome del file


Ok ma io devo aggiungere la libreria del file

il fatto e' che non emette i dati:

$sql = "SELECT DISTINCT(LOGLKN) FROM VAM400.LOGMON00F order by loglkn";



/* Esecuzione diretta dello stament SQL */
$stmt = db2_exec($dbh, $sql, array('cursor' => DB2_SCROLLABLE));

print '<table border=0 cellpadding9 cellspacing=0 bgcolor="#F7F7F7" bordercolor="#F7F7F7">';


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[18];
$costumerLOGINO = $row[15];
$costumerLOGJOL = $row[14];
$costumerLOGLAL = $row[13];
?>
<tr>

<td bgcolor="#CCCCCC" align="left" width="100">
<a href="srvrq13.php?costumerLOGTRE=<?php echo($costumerLOGTRE);?>
&costumerLOGLKN=<?php echo($costumerLOGLKN);?>
&costumerLOGTSM=<?php echo($costumerLOGTSM);?> "'>





QUA DOVREBBE STAMPARE IL VALORE DI LOGLKN, MA NIENTE


<?php echo ($costumerLOGLKN);?></a>
</td>