Hi, im making a tab/lyric portal, and for viewing tabs i want to display the
time the lyric/tab was submitted. So I retrive it from a MySQL database (as
a timestamp) and format it using the date function. The problem is, that the
date: 19-01-2038 04:14:07 is allways returned, even though in the `date`
field the timestamp says (as an actual example) 20020723200919.

Here is a shortened version of the script:

$link = mysql_connect($dbhost, $dbuser, $dbpass);

mysql_select_db($dbname, $link);

$get_resource = mysql_query("SELECT
`artist_id`,`title`,`content`,`user_id`,`date`,`type`,`views` FROM
`resources` WHERE `id` = $id");

$values = mysql_fetch_row($get_resource);

<?php $submitdate = date("d-m-Y H:i:s", $values[4]); echo("Submitted on
$submitdate"); ?>

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

Reply via email to