Hi Marc,

Yes thats true $sql['date'] comes from :

for ($i=0;$i<mysql_num_rows($sql_id);$i++)
{
        //Get all entries from datebase
        $sql = mysql_fetch_assoc($sql_id);
        $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
        $entry_date = date('l, d F Y H:i:s','$sql["date"]');
        echo "
        <tr bgcolor=\"$bgcolor\">
        <td height=\"100\" width=\"150\"
valign=\"top\">[".$sql['entryID']."]<br> ".$sql
['name']."<br>".$sql['email']."<br>".$sql['location']."<br></td>
        <td width=\"450\" valign=\"top\">
        <div class=\"date\">$enty_date</div>
        <hr size=\"1\" width=\"100%\">
        <div>".$sql['comments']."</div>
        </td>
        </tr>";
}

Do u have any sugestions. Now it just says Thursday, 01 January 1970 all
the time. The columm type i use in my mysql database is datetime. Thanks
already..

Best regards,
 
Davy Obdam,
mailto:[EMAIL PROTECTED]


-----Original Message-----
From: H Marc Bower [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, October 06, 2002 1:54 PM
To: Davy Obdam; Php Mailinglist; Php-Windows Mailing
Subject: Re: [PHP-WIN] Using date() function


Am I correct in assuming that $sql[] is the result of a
mysql_fetch_array (or similar call)?  If so, you shouldn't need the " in
$sql["date"].

(V)

----- Original Message -----
From: "Davy Obdam" <[EMAIL PROTECTED]>
> $entry_date = date('l, d F Y H:i:s','$sql["date"]');
> echo $entry_date;
>
> But then i dont get the date i need. It says Thursday, 01 January 1970

> 01:00:00 (i wasn`t even born then;-), so it wasn`t me signing that 
> guestbook. Any sugestions what i am doing wrong. Thanks for your time.




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to