Hi to all
Result of my SQL Query is attached
My Query is
SELECT * FROM $tbl_name WHERE TO_DAYS( NOW( ) ) - TO_DAYS( `pDate` ) >20
AND mid(`SiteID`,1,1) ='C' AND `cDate` LIKE '0000-00-00' AND `crDate` LIKE '0000-00-00'
For Showing I use this Code
echo "<table cellpadding=2 align=center cellspacing=2 width=90% style='font-family:Calibri,Arial' >";
echo "<tr>";
echo "<th bgcolor=#666666 width=250px>Site ID</th>";
echo "<th bgcolor=#666666 width=250px>Code</th>";
echo "<th bgcolor=#666666>Owner Name</th>";
echo "<th bgcolor=#666666>Due Month</th>";
echo "<th bgcolor=#666666>Process Date</th>";
echo "</tr>";
while($row = mysql_fetch_array($result))
{
if($bgcolor=='#cccccc'){$bgcolor='#ffffff';}
else{$bgcolor='#cccccc';}
echo "<tr>";
echo "<td bgcolor=$bgcolor>" . $row['SiteID'] . "</td>";
echo "<td bgcolor=$bgcolor>" . $row['Code'] . "</td>";
echo "<td bgcolor=$bgcolor>" . $row['OwnerName'] . "</td>";
echo "<td bgcolor=$bgcolor>" .date("F",strtotime($row['DurationS'])). "</td>";
echo "<td bgcolor=$bgcolor>" .date("j-F-Y",strtotime($row['pDate'])). "</td>";
echo "</tr>";
}
echo "</table>";
I want To Filter Code in ascending and descending order.
Is it possible