0

Hello,
how do i add an hour to time with DATE_ADD in DATE_FORMAT? Here is my code :

<?php
session_start(); 
include('includes/main_funcs.php');
$db = db();
$reponse = $db->query('SELECT name, message, DATE_FORMAT(time, \'%H:%i\') AS forTime FROM chat ORDER BY ID DESC LIMIT 0, 10');

while ($donnees = $reponse->fetch())
{
    echo'['.$donnees['forTime'].'] <strong>'.htmlspecialchars($donnees['name']).'</strong> : ' . htmlspecialchars($donnees['message']);
    echo'<br />';
}

$reponse->closeCursor();
?>

thank you

2
Contributors
4
Replies
22
Views
4 Years
Discussion Span
Last Post by Sanchixx
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.