include 'variabili.php';
/* APRO CONNESSIONE AS400 */
$connessione = odbc_connect($dsn, $db_user, $db_pass);
if (!$connessione) {
echo("ERRORE\n");
exit();
}
/* ESEGUO QUERY */
$query = "SELECT DRI_DRIGA FROM W772_070.WFARI00F WHERE DRI_AAMOV = 22 AND DRI_NUMOV = 299";
$risultato = odbc_exec($connessione,$query);
while($myRow = odbc_fetch_array( $risultato )){
array_push($myRow);
}
$DettaglioLinee = array();
for ($i = 1; $i < 4; $i++) {
$DettaglioLinee[$i] = array(
'NumeroLinea' => $i,
'Descrizione' => $myRow[$i],
'Quantita' => '5.00',
'PrezzoUnitario' => '1.00',
'PrezzoTotale' => '5.00',
'AliquotaIVA' => '22.00'
);
}
Ovviamente non funziona... hai qualche suggerimento di come impostare?