I want to show distinct Year in my currenttime database field which is actually timestamp by structure.
I want to show years like :-
2011 and so on .
but the problem , the result of my query gives me
which i want as shown above i .e 2013,2012,2011 and so on....
<?php echo $currentyear= date("Y");?> $query_rs_dyear = "Select DISTINCT complaint.currenttime from complaint WHERE complaint.currenttime!='$currentyear' order by '$currentyear' desc";