I have a table for transactions that need to display the first transaction date and the last transaction date. The column is FECHA which is spanish. I just cannot get the dates to display.
If you know of a better solution I would love to here it.
<?php
    $result2 = mysql_query("SELECT `FECHA` FROM `transaction` where id = '".$id."' GROUP BY `id` ORDER BY `FECHA` ASC LIMIT `1`");
    $trans = mysql_fetch_row($result2);
    $date = date_create($trans[0]);
    echo date_format($date, 'd/m/y');
    #output: 24/03/12
    $result1 = mysql_query("SELECT `FECHA`  FROM `transaction`  where id = '".$id."' GROUP BY `id` ORDER BY `FECHA` DESC LIMIT `1`");
    $trans = mysql_fetch_row($result1);
    $date = date_create($trans[0]);
    echo date_format($date, 'd/m/y');
    #output: 24/03/12
?>
 
     
    