<?php include 'sesion_user.php';?><?

$sql = "SELECT * FROM `ventas` ORDER BY ID desc LIMIT 1";

$consulta = mysql_query ($sql);

while ($row = mysql_fetch_array($consulta))

{
$ID_venta = $row["ID"];
$fecha = $row["fecha"];
$total = $row["total"];
$usuario = $row["usuario"];
$forma_pago = $row["forma_pago"];
$ano = substr($fecha, 0,4);
$mes = substr($fecha, 4,2);
$dia = substr($fecha, 6,2);
$hora = substr($fecha, 8,2);
$min = substr($fecha, 10,2);

 echo  "$hora"; ?>:<?php echo $min ?> | <?php


$dhoy = date(d);
$mhoy = date(m);


if ($dia == $dhoy and $mes == $mhoy) { echo "hoy"; } else {
echo "$dia/$mes";  };


}
mysql_free_result($consulta4);

?>
