Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/10/2014, 13:35
Avatar de Alexis88
Alexis88
Philosopher
 
Fecha de Ingreso: noviembre-2011
Ubicación: Tacna, Perú
Mensajes: 5.552
Antigüedad: 13 años, 3 meses
Puntos: 977
Respuesta: Formato de Fecha PHP

Asígnale un alias y así podrás tomar el dato.

Código PHP:
Ver original
  1. $consulta = 'SELECT id, DATE_FORMAT(NOW(day),'%d %b %y') AS fecha, title, subtitle, photo, content FROM news ORDER BY day DESC';
  2. $query = mysqli_query($conexion, $consulta) or exit ('Se produjo un error');
  3. if (mysqli_num_rows($query)){
  4.     while ($row = mysqli_fetch_array($query)){
  5.         echo 'La fecha: ' . $row['fecha'] . '<br />';
  6.     }
  7.     mysqli_free_result($query);
  8. }

Saludos
__________________
«Juro por mi vida y mi amor por ella, que jamás viviré para el provecho de otro hombre, ni le pediré a otro hombre que viva para el mío».

Ayn Rand