.I have the following code. I am wondering why does my “echo '<font color="#FF0000">'.$update_date2.'</font><br><br>'.$status.'<br>';” does not show on the screen?
.is it okay to use while statement inside another while statement? as shown in my code below.
<?php
$getquery = mysql_query("SELECT * FROM it_task ORDER BY task_id DESC");
while ($rows = mysql_fetch_array($getquery))
{
$id= $rows['task_id'];
$date=$rows['date'];
$update_date = $rows['update_date'];
$project=$rows['project'];
$topic=$rows['topic'];
$instby=$rows['instby'];
$inst=$rows['inst'];
$dline=$rows['dline'];
$ocome=$rows['ocome'];
$comm=$rows['comm'];
$fin=$rows['fin'];
echo "<div id=\"container\">";
echo "<table>";
echo "<tr>";
echo "<div id=\"conid\">$id</div>";
echo "<div id=\"condate\">$date</div>";
echo "<div id=\"conproject\">$project</div>";
echo "<div id=\"contask\">$topic</div>";
echo "<div id=\"conselect\">$instby</div>";
echo "<div id=\"conselect1\">$inst</div>";
echo "<div id=\"condline\">$dline</div>";
echo "<div id=\"conocome\">";
$updatesquery = "SELECT * FROM it_task_update WHERE update_id=$id";
while($rows1 = mysql_fetch_array($updatesquery));
{
$update_date2 = $rows1['update_date'];
$status = $rows1['ocome'];
$update_id = $rows1['update_id'];
echo '<font color="#FF0000">'.$update_date2.'</font><br><br>'.$status.'<br>';
}
echo "</div>";
echo "<div id=\"concomm\">$comm</div>";
echo "<div id=\"confin\">$fin</div>";
echo "</tr>";
echo "</table>";
echo "</div>";
}
?>
.where have i done wrong in this set of codes. can anyone guide me pls. TIA! More power! 🙂
You have a semicolon after the inner while
should be