Questa è la query con il solo join
Quando vado a stampare il campo cliente mi va in "termina scheda", se invece la decommento va.....Codice PHP:$query = "SELECT nwPrevProdotti.IdLavoro, nwPrevProdotti.prodotto, nwPrevProdotti.tiratura1, nwPrevProdotti.tiratura2, nwPrevProdotti.tiratura3, nwPrevProdotti.tiratura4, nwPrevProdotti.prezzoUnitario1, nwPrevProdotti.prezzoUnitario2, nwPrevProdotti.prezzoUnitario3, nwPrevProdotti.prezzoUnitario4, nwPrevClienti.cliente FROM nwPrevProdotti JOIN nwPrevClienti ON nwPrevProdotti.IdLavoro = nwPrevClienti.IdLavoro ";
Codice PHP:while ($row = sqlsrv_fetch_array($result)) {
$texthtml .= "<div class=\"riga\">";
$texthtml .= "<div class=\"codice\">";
$texthtml .= $row['IdLavoro'];
$texthtml .= $row['cliente'];
$texthtml .= "</div>";
$texthtml .= "<div class=\"nome\">";
$texthtml .= $row['prodotto'];
$texthtml .= "</div>";
$texthtml .= "";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= $row['tiratura1'];
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= $row['tiratura2'];
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= $row['tiratura3'];
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= $row['tiratura4'];
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= round($row['prezzoUnitario1'],4);
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= round($row['prezzoUnitario2'],4);
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= round($row['prezzoUnitario3'],4);
$texthtml .= "</div>";
$texthtml .= "<div class=\"tirapre\">";
$texthtml .= round($row['prezzoUnitario4'],4);
$texthtml .= "</div>";
$texthtml .= "</div>";
}

Rispondi quotando
