Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Como exibir apenas campos diferentes de zero no mysql através de php e HTML?


dentro do seu loop while use para cada campo assim (use assim para todos os 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>";
}