I am facing a bug I guess, the database records the date format as YYYY-MM-DD, below is the table:-

The 1st table is the funds and the second is the fundshistory, as you can see LibraIncomeExtra Fund has the same date, but it still show stars. Below is my coding:-
<?php
$result = mysql_query("SELECT * FROM funds");
$numrows = mysql_num_rows($result);
$getdate = date('y-m-j');
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>";
echo "<center>";
if ($row['nav'] != $row['oldnav'])
{
if ($row['date_update'] != $getdate)
{
echo "" .$row['fundname']. "**";
$latestupdate = $row['date_update'];
}
}
else
{
echo $row['fundname'];
}
echo "</center>";
echo "</td>";
echo "<td>";
echo"<center>";
echo $row['nav'];
echo "</center>";
echo "</td>";
echo "</tr>";
}
?>
Anyone can explain this? I know mysql extension is decprecated, but this coding was made long time ago, so I don't wish to redo to whole system by just changing mysqli extension.
$getdateis set to the current date of the server sodate_updatewill only equal$getdateif the script is run when the server date equalsdate_update. What are you trying to accomplish with this script?