i've got a timestamp but can't seem to groupd them by year;
$queryy = "SELECT * FROM run_content WHERE kind ='news' GROUP BY 'datecreated[2]datecreated[3]' ORDER BY datecreated DESC";
//i was hoping this would group up 03, 04, 05 etc from 20051005063752
$resulty = mysql_query($queryy) or die ("Error in query: $query. " . mysql_error());
while ($row = mysql_fetch_array($resulty)) {
$datecreated = $row['datecreated'];
$years = "20$datecreated[2]$datecreated[3]";
$dts++;
echo "$years $dts";
}
is there a comand, ie GROUP BY datecreate'YEAR' ?
many thanks...