sql >> Base de Datos >  >> RDS >> Mysql

¿Cómo mostrar solo campos distintos de cero en mysql a través de php y HTML?

dentro de su uso de ciclo while para cada campo como este (use así para todos los campos):

while($row = mysqli_fetch_assoc($result))
   {

if($row['samplerecived']=="0000-00-00") $row['samplerecived']="";

echo "<tr>";
   echo "<br />";
echo "Department:".$row['dept'] ;
echo "<td>" . $row['samplerecived'] . "</td>";
   echo "<td>" . $row['molbioextraction'] . "</td>";
echo "<td>" . $row['molbioextractionqc'] . "</td>";
echo "<td>" . $row['libraryprep'] . "</td>";
   echo "<td>" . $row['libraryqc'] . "</td>";
echo "<td>" . $row['sequencing'] . "</td>";
echo "<td>" . $row['datacheck'] . "</td>";
   echo "<td>" . $row['resequencing'] . "</td>";
echo "<td>" . $row['qccheck'] . "</td>";
echo "<td>" . $row['analysisstarted'] . "</td>";
   echo "<td>" . $row['analysiscompleted'] . "</td>";
echo "<td>" . $row['report'] . "</td>";
echo "<td>" . $row['outbound'] . "</td>";
echo "</tr>";
}